ttrss/gulpfile.js

33 lines
762 B
JavaScript
Raw Permalink Normal View History

2020-09-17 10:30:52 +00:00
// Less configuration
const gulp = require('gulp');
const less = require('gulp-less');
const touch = require('gulp-touch-fd');
2020-09-17 10:30:52 +00:00
function swallowError(error) {
console.log(error.toString())
this.emit('end')
}
2020-09-17 10:30:52 +00:00
gulp.task('less', function(cb) {
gulp
.src(['themes/compact.less', 'themes/compact_night.less',
'themes/light.less', 'themes/light-high-contrast.less', 'themes/night_blue.less', 'themes/night.less'])
2021-03-22 13:18:59 +00:00
.pipe(less({javascriptEnabled: true}))
.on('error', swallowError)
2020-09-17 10:30:52 +00:00
.pipe(
gulp.dest(function(f) {
return f.base;
})
).pipe(touch());
2020-09-17 10:30:52 +00:00
cb();
});
gulp.task(
'default',
gulp.series('less', function(cb) {
gulp.watch(['themes/*.less', 'themes/*/*.less'], gulp.series('less'));
cb();
})
);