Merge pull request #299 from lpenaud/watch-task

Set up gulp watch
This commit is contained in:
Alexandre Vicenzi 2022-07-08 15:35:08 +02:00 committed by GitHub
commit fdcd9fa344
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -40,5 +40,14 @@ gulp.task('pygments', function () {
.pipe(gulp.dest('./static/pygments')); .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('default', gulp.series(['less', 'uglify', 'cp', 'pygments']));
gulp.task('watch', gulp.series('default', gulp.parallel('watch-less', 'watch-js')));

View file

@ -8,7 +8,8 @@
}, },
"scripts": { "scripts": {
"test": "source venv/bin/activate && pip install pelican markdown && pelican -s tests/pelicanconf.py && deactivate", "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": { "repository": {
"type": "git", "type": "git",