Set up gulp watch #226
This commit is contained in:
parent
8d939f7f5e
commit
e0f1ab7d52
2 changed files with 11 additions and 1 deletions
|
@ -40,5 +40,14 @@ gulp.task('pygments', function () {
|
|||
.pipe(gulp.dest('./static/pygments'));
|
||||
});
|
||||
|
||||
gulp.task('watch-less', function () {
|
||||
return gulp.watch('static/stylesheet/*.less', gulp.task('less'));
|
||||
});
|
||||
|
||||
gulp.task('watch-js', function () {
|
||||
return gulp.watch('static/dark-theme/!(*.min).js', gulp.task('uglify'));
|
||||
})
|
||||
|
||||
gulp.task('default', gulp.series(['less', 'uglify', 'cp', 'pygments']));
|
||||
|
||||
gulp.task('watch', gulp.series('default', gulp.parallel('watch-less', 'watch-js')));
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"test": "source venv/bin/activate && pip install pelican markdown && pelican -s tests/pelicanconf.py && deactivate",
|
||||
"build": "node_modules/gulp/bin/gulp.js default"
|
||||
"build": "gulp default",
|
||||
"watch": "gulp watch"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
Loading…
Reference in a new issue