0.0.9 • Published 7 years ago

gulp-bg v0.0.9

Weekly downloads
587
License
-
Repository
github
Last release
7 years ago

gulp-bg

Execute command to run in the background. Calling the returned function restarts the process if it's already running.

Usage

Run a process in the background, and restart on changes.

var bg = require("gulp-bg");

let bgtask;
gulp.task("server", bgtask = bg("node", "--harmony", "server.js"));

const exitCallback = (proc) => { if (proc.errorcode != 0) { process.exit(proc.errorcode); } };

gulp.task("stop", () => {
    bgtask.setCallback(exitCallback);
    bgtask.stop();
  }
});

gulp.task("default", ["server"], function() {
  gulp.watch(["server.js"], ["server"]);
});

License

MIT

0.0.9

7 years ago

0.0.8

8 years ago

0.0.7

9 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago