afterbuild-starter
v1.0.2
Published
Automatically starts your Web app after build is over
Downloads
16
Maintainers
Readme
AfterBuild-Starter
Installation
$ npm install afterbuild-starter
What's afterbuild-starter?
When the build process is over, afterbuild-starter will automatically:
- stop the node process that runs your Web app (if exists)
- start a new node process with your Web app
- open the browser with the url of your site
Setting up
you can use starter({path:"",url:""})
at any final callback of any build system.
starter({path:"",url:""}) takes 2 args:
- path - The path to the .js file containing the main node app (String)
- url - The url to your website (String) (Default:"http://localhost")
Examples
With gulpfile.js
:
var starter = require('node-starter');
gulp.task('default', ['minify-html'], function(){
starter({path:"Path/To/Your/main.js",url:"URL/to/your/site"});
});
With Gruntfile.js
:
var starter = require('node-starter');
grunt.registerTask('starter', function() {
starter({path:"Path/To/Your/main.js",url:"URL/to/your/site"});
});
grunt.registerTask('default', ['yourTask1', 'yourTask2', 'starter']);
With Pint.js
:
var starter = require('node-starter');
module.exports = {
name: 'default',
finalize: function () {
starter({path:"Path/To/Your/main.js",url:"URL/to/your/site"});
}
};