2020-09-17 10:30:52 +00:00
|
|
|
// Less configuration
|
|
|
|
const gulp = require('gulp');
|
|
|
|
const less = require('gulp-less');
|
2021-02-04 12:30:28 +00:00
|
|
|
const touch = require('gulp-touch-fd');
|
2020-09-17 10:30:52 +00:00
|
|
|
|
2020-09-18 09:14:37 +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/night_blue.less', 'themes/night.less'])
|
2021-03-22 13:18:59 +00:00
|
|
|
.pipe(less({javascriptEnabled: true}))
|
2020-09-18 09:14:37 +00:00
|
|
|
.on('error', swallowError)
|
2020-09-17 10:30:52 +00:00
|
|
|
.pipe(
|
|
|
|
gulp.dest(function(f) {
|
|
|
|
return f.base;
|
|
|
|
})
|
2021-02-04 12:30:28 +00:00
|
|
|
).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();
|
|
|
|
})
|
|
|
|
);
|