diff --git a/gulpfile.js b/gulpfile.js index 81e090913..3d928f570 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -16,6 +16,7 @@ const gulp = require('gulp'), vinylBuffer = require('vinyl-buffer'), browserSync = require('browser-sync'), glob = require('glob'), + spawn = require('cross-spawn'), fs = require('fs'), path = require('path'), YAML = require('yaml'), @@ -224,7 +225,7 @@ gulp.task('js', () => { */ gulp.task('watch-jekyll', (cb) => { browserSync.notify('Building Jekyll'); - return cp.spawn('bundle', ['exec', 'jekyll', 'build', '--watch', '--destination', demoDir, '--trace'], { stdio: 'inherit' }) + return spawn('bundle', ['exec', 'jekyll', 'build', '--watch', '--destination', demoDir, '--trace'], { stdio: 'inherit' }) .on('close', cb); }); @@ -235,7 +236,7 @@ gulp.task('build-jekyll', (cb) => { var env = Object.create(process.env); env.JEKYLL_ENV = 'production'; - return cp.spawn('bundle', ['exec', 'jekyll', 'build', '--destination', demoDir, '--trace'], { env: env, stdio: 'inherit' }) + return spawn('bundle', ['exec', 'jekyll', 'build', '--destination', demoDir, '--trace'], { env: env, stdio: 'inherit' }) .on('close', cb); }); diff --git a/package.json b/package.json index 5e0f188f7..0d89a0f13 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "@rollup/stream": "^1.1.0", "autoprefixer": "^10.0.1", "browser-sync": "^2.26.13", + "cross-spawn": "^7.0.3", "gulp": "^4.0.2", "gulp-clean": "^0.4.0", "gulp-clean-css": "^4.3.0",