Subscribe to our list to receive the latest updates on Node on Fire

Class: StageMethods

StageMethods

new StageMethods()

This module is responsible for the management of run build and release methods invoked in the stages.

For example, you can set a function to be executed in the build stage:

app.build(function test() {
    // Do some work.
});

This test method gets executed when you fire build or you can invoke it directly by calling fire build:test.

If you want to create tasks which do not run in the build stage automatically, see the Tasks module.

You can also create functions to be executed in the release and the run stage:

app.release(function check() {
    // Do your thing.
});

Or for the run:

app.run(function() {
    // Run called.
});

Please note that run is invoked in every process. To see which process is being run, you can check the argv dependency:

app.run(function(argv) {
    if(argv.web) {
        // This is the web process.
    }
});

Do you have any questions or comments on this page? Start a discussion below.

comments powered by Disqus
Subscribe to our list to receive the latest updates on Node on Fire