forked from caprover/caprover-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
30 lines (28 loc) · 830 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const gulp = require('gulp')
const watch = require('gulp-watch')
const gulpless = require('gulp-less')
const debug = require('gulp-debug')
var csso = require('gulp-csso')
const autoprefixer = require('gulp-autoprefixer')
const NpmImportPlugin = require('less-plugin-npm-import')
gulp.task('watch', function () {
watch(['src/styles/*'], gulp.series(['less']))
})
gulp.task('less', function () {
return gulp
.src('src/styles/*-theme.less')
.pipe(debug({ title: 'Less files:' }))
.pipe(
gulpless({
javascriptEnabled: true,
plugins: [new NpmImportPlugin({ prefix: '~' })],
})
)
.pipe(autoprefixer())
.pipe(
csso({
debug: true,
})
)
.pipe(gulp.dest('./public'))
})