forked from alexandrevicenzi/Flex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
44 lines (38 loc) · 1.22 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
var gulp = require('gulp'),
less = require('gulp-less'),
rename = require('gulp-rename'),
cssnano = require('gulp-cssnano'),
uglify = require('gulp-uglify');
gulp.task('less', function () {
return gulp.src([
'./static/stylesheet/dark-theme.less',
'./static/stylesheet/style.less',
])
.pipe(less())
.pipe(cssnano())
.pipe(rename({
extname: '.min.css'
}))
.pipe(gulp.dest('./static/stylesheet'));
});
gulp.task('uglify', function () {
return gulp.src('./static/dark-theme/dark-theme.js')
.pipe(uglify())
.pipe(rename({
extname: '.min.js'
}))
.pipe(gulp.dest('./static/dark-theme'));
});
gulp.task('cp', function () {
return gulp.src('./node_modules/font-awesome/**/*.{min.css,otf,eot,svg,ttf,woff,woff2}')
.pipe(gulp.dest('./static/font-awesome'));
});
gulp.task('pygments', function () {
return gulp.src(['./static/pygments/*.css', '!./static/pygments/*min.css'])
.pipe(cssnano())
.pipe(rename({
extname: '.min.css'
}))
.pipe(gulp.dest('./static/pygments'));
});
gulp.task('default', gulp.series(['less', 'uglify', 'cp', 'pygments']));