gulp task for nginx and client to be launched in sequence
This commit is contained in:
parent
5486413a0a
commit
c86808603e
13
gulpfile.js
13
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';
|
||||
|
|
Loading…
Reference in New Issue