gulp task for nginx and client to be launched in sequence

This commit is contained in:
Carlos Jimenez 2018-01-11 08:12:21 +01:00
parent 5486413a0a
commit c86808603e
1 changed files with 13 additions and 0 deletions

View File

@ -38,6 +38,15 @@ gulp.task('client', ['clean'], function() {
return gulp.start('watch', 'routes', 'locales', 'webpack-dev-server');
});
gulp.task('nginxRestart', callback => {
let isWindows = /^win/.test(process.platform);
let command = isWindows ? './dev.cmd' : './dev.sh';
exec(command, (err, stdout, stderr) => {
console.log(stdout);
callback(err);
});
});
gulp.task('services', () => {
process.env.NODE_ENV = gutil.env.env || 'development';
const pathServices = './services/';
@ -50,6 +59,10 @@ gulp.task('services', () => {
});
});
gulp.task('clientDev', callback => {
runSequence('nginxRestart', 'client', callback);
});
gulp.task('servicesDev', callback => {
let isWindows = /^win/.test(process.platform);
let command = isWindows ? 'docker inspect dblocal | findstr Status' : 'docker inspect dblocal | grep Status';