mirror of
				https://github.com/cookiecutter/cookiecutter-django.git
				synced 2025-11-04 01:47:28 +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'),
 | 
			
		||||
      uglify = require('gulp-uglify'),
 | 
			
		||||
      imagemin = require('gulp-imagemin'),
 | 
			
		||||
      exec = require('child_process').exec,
 | 
			
		||||
      spawn = require('child_process').spawn,
 | 
			
		||||
      runSequence = require('run-sequence'),
 | 
			
		||||
      browserSync = require('browser-sync').create(),
 | 
			
		||||
      reload = browserSync.reload;
 | 
			
		||||
| 
						 | 
				
			
			@ -73,10 +73,11 @@ gulp.task('imgCompression', function(){
 | 
			
		|||
});
 | 
			
		||||
 | 
			
		||||
// Run django server
 | 
			
		||||
gulp.task('runServer', function() {
 | 
			
		||||
  exec('python manage.py runserver', function (err, stdout, stderr) {
 | 
			
		||||
    console.log(stdout);
 | 
			
		||||
    console.log(stderr);
 | 
			
		||||
gulp.task('runServer', function(cb) {
 | 
			
		||||
  var cmd = spawn('python', ['manage.py', 'runserver'], {stdio: 'inherit'});
 | 
			
		||||
  cmd.on('close', function(code) {
 | 
			
		||||
    console.log('runServer exited with code ' + code);
 | 
			
		||||
    cb(code);
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user