diff --git a/gulpfile.js b/gulpfile.js index e88ced5..d33426d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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'))); diff --git a/package.json b/package.json index 1c8063d..a10cf9c 100644 --- a/package.json +++ b/package.json @@ -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",