I am using angular-cli in my project.I want to add some gulp tasks for deployment. Is it possible for me to call "ng build" from inside a gulp task ?
you can use child_process to make a command line call:
var exec = require('child_process').exec;
gulp.task('build', function (cb) {
exec('ng build', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
})
see also here: Running a shell command from gulp for other solutions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With