diff --git a/gulpfile.js b/gulpfile.js index 4c961ba07..13fa1709e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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';