Skip to content

Commit

Permalink
build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
codecalm committed Nov 4, 2020
1 parent 3a843a7 commit a5eacf1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,17 @@ gulp.task('unused-files', (cb) => {
/**
* Clean `dist` folder before build
*/
gulp.task('clean', () => {
gulp.task('clean-dirs', () => {
return gulp
.src(`{${distDir}/*,${demoDir}/*}`, { read: false })
.pipe(clean());
});

gulp.task('clean-jekyll', (cb) => {
return cp.spawn('bundle', ['exec', 'jekyll', 'clean'], { stdio: 'inherit' })
.on('close', cb);
});

/**
* Compile SASS to CSS and move it to dist directory
*/
Expand Down Expand Up @@ -219,7 +224,7 @@ gulp.task('js', () => {
*/
gulp.task('watch-jekyll', (cb) => {
browserSync.notify('Building Jekyll');
return cp.spawn('bundle', ['exec', 'jekyll', 'build', '--watch', '--destination', demoDir], { stdio: 'inherit' })
return cp.spawn('bundle', ['exec', 'jekyll', 'build', '--watch', '--destination', demoDir, '--trace'], { stdio: 'inherit' })
.on('close', cb);
});

Expand All @@ -230,7 +235,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], { env: env, stdio: 'inherit' })
return cp.spawn('bundle', ['exec', 'jekyll', 'build', '--destination', demoDir, '--trace'], { env: env, stdio: 'inherit' })
.on('close', cb);
});

Expand Down Expand Up @@ -333,6 +338,8 @@ gulp.task('add-banner', () => {
.pipe(gulp.dest(`${distDir}`))
});

gulp.task('clean', gulp.series('clean-dirs', 'clean-jekyll'));

gulp.task('start', gulp.series('clean', 'sass', 'js', 'build-jekyll', gulp.parallel('watch-jekyll', 'watch', 'browser-sync')));

gulp.task('build-core', gulp.series('build-on', 'clean', 'sass', 'js', 'copy-images', 'copy-libs', 'add-banner'));
Expand Down

0 comments on commit a5eacf1

Please sign in to comment.