mirror of
https://github.com/Xevion/old.xevion.github.io.git
synced 2025-12-09 04:07:48 -06:00
Update a few packages
This commit is contained in:
@@ -1,23 +1,30 @@
|
||||
const browserSync = require('browser-sync').create();
|
||||
const cp = require('child_process');
|
||||
const browserSync = require('browser-sync').create();
|
||||
const cp = require('child_process');
|
||||
|
||||
const jekyll = process.platform === 'win32' ? 'jekyll.bat' : 'jekyll';
|
||||
const jekyll = process.platform === 'win32' ? 'jekyll.bat' : 'jekyll';
|
||||
|
||||
const scssPath = '_scss/**/*.scss';
|
||||
const jsPath = '_scripts/*.js';
|
||||
const templatePath = ['*.html', '+(_includes|_layouts)/*.html', '*.yml', '_data/*.yml', '_posts/*'];
|
||||
const scssPath = '_scss/**/*.scss';
|
||||
const jsPath = '_scripts/*.js';
|
||||
const templatePath = [
|
||||
'*.html',
|
||||
'+(_includes|_layouts)/*.html',
|
||||
'*.yml',
|
||||
'_data/*.yml',
|
||||
'_posts/*',
|
||||
];
|
||||
|
||||
module.exports = gulp => {
|
||||
|
||||
// run `jekyll build`
|
||||
gulp.task('jekyll-build', done => {
|
||||
return cp.spawn(jekyll, ['build'], {stdio: 'inherit'})
|
||||
.on('close', done);
|
||||
return cp.spawn(jekyll, ['build'], { stdio: 'inherit' }).on('close', done);
|
||||
});
|
||||
|
||||
// run `jekyll build` with _config_dev.yml
|
||||
gulp.task('jekyll-dev', done => {
|
||||
return cp.spawn(jekyll, ['build', '--config', '_config.yml,_config_dev.yml'], {stdio: 'inherit'})
|
||||
return cp
|
||||
.spawn(jekyll, ['build', '--config', '_config.yml,_config_dev.yml'], {
|
||||
stdio: 'inherit',
|
||||
})
|
||||
.on('close', done);
|
||||
});
|
||||
|
||||
@@ -29,13 +36,12 @@ module.exports = gulp => {
|
||||
gulp.task('serve', ['jekyll-dev'], () => {
|
||||
browserSync.init({
|
||||
server: {
|
||||
baseDir: '_site'
|
||||
}
|
||||
baseDir: '_site',
|
||||
},
|
||||
});
|
||||
|
||||
gulp.watch(scssPath, ['sass', browserSync.reload]);
|
||||
gulp.watch(jsPath, ['scripts', browserSync.reload]);
|
||||
gulp.watch(templatePath, ['jekyll-rebuild']);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user