-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
27 lines (23 loc) · 897 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// task runner -- use this on Windows
'use string';
var gulp = require('gulp');
var help = require('gulp-task-listing');
var cp = require('child_process');
var sync = require('browser-sync');
gulp.task('help', help);
gulp.task('default', help);
gulp.task('build', function () {
//return cp.spawn('bundle', ['exec', 'jekyll', 'build'], {stdio: 'inherit'});
return cp.execSync('bundle exec jekyll build', {stdio: 'inherit'})
});
gulp.task('serve', ['build'], function(){
sync.init({server: './_site'});
gulp.watch('./source/**/*', ['build'])
gulp.watch('./_site/**/*').on('change', sync.reload)
});
gulp.task('stage', function () {
return cp.execSync('bundle exec jekyll build --config=_config.yml,_staging.yml', {stdio: 'inherit'})
});
gulp.task('publish', function () {
return cp.execSync('bundle exec jekyll build --config=_config.yml,_publish.yml', {stdio: 'inherit'})
});