Current Code:
var open = require('open');
var gulp = require("gulp");
var pkg = require("../../package.json");
//opens the launchpage with default browser
gulp.task("open", function () {
open('http://localhost:' + pkg.webServerPort + '/commonclient/launchpage.html');
});
Right now, running the gulp
command starts the server and does a bunch of other compilation tasks. How to modify this to run the "open" task only if I type in gulp -o
or something like that in command line?