mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-24 00:04:13 +03:00
Gulpfile child process spawn (#1074)
* Update gulpfile to use child_process.spawn Use child_process.spawn in place of child_process exec to ensure that console output is captured by Gulp. Fixes #939 * Remove extra line
This commit is contained in:
parent
46af6b4760
commit
a286e32e2b
|
@ -16,7 +16,7 @@ var gulp = require('gulp'),
|
||||||
pixrem = require('gulp-pixrem'),
|
pixrem = require('gulp-pixrem'),
|
||||||
uglify = require('gulp-uglify'),
|
uglify = require('gulp-uglify'),
|
||||||
imagemin = require('gulp-imagemin'),
|
imagemin = require('gulp-imagemin'),
|
||||||
exec = require('child_process').exec,
|
spawn = require('child_process').spawn,
|
||||||
runSequence = require('run-sequence'),
|
runSequence = require('run-sequence'),
|
||||||
browserSync = require('browser-sync').create(),
|
browserSync = require('browser-sync').create(),
|
||||||
reload = browserSync.reload;
|
reload = browserSync.reload;
|
||||||
|
@ -73,10 +73,11 @@ gulp.task('imgCompression', function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
// Run django server
|
// Run django server
|
||||||
gulp.task('runServer', function() {
|
gulp.task('runServer', function(cb) {
|
||||||
exec('python manage.py runserver', function (err, stdout, stderr) {
|
var cmd = spawn('python', ['manage.py', 'runserver'], {stdio: 'inherit'});
|
||||||
console.log(stdout);
|
cmd.on('close', function(code) {
|
||||||
console.log(stderr);
|
console.log('runServer exited with code ' + code);
|
||||||
|
cb(code);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user