Greatly simplified all of the logic; moved the JS to a separate file
This commit is contained in:
parent
a18c421354
commit
582adec6a4
11 changed files with 105 additions and 121 deletions
21
gulpfile.js
21
gulpfile.js
|
@ -1,22 +1,31 @@
|
|||
var gulp = require('gulp'),
|
||||
less = require('gulp-less'),
|
||||
rename = require('gulp-rename'),
|
||||
minify = require('gulp-cssnano');
|
||||
cssnano = require('gulp-cssnano'),
|
||||
uglify = require('gulp-uglify');
|
||||
|
||||
gulp.task('less', function () {
|
||||
return gulp.src([
|
||||
'./static/stylesheet/dark-theme-has-class.less',
|
||||
'./static/stylesheet/dark-theme-not-overridden.less',
|
||||
'./static/stylesheet/dark-theme.less',
|
||||
'./static/stylesheet/style.less',
|
||||
])
|
||||
.pipe(less())
|
||||
.pipe(minify())
|
||||
.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'));
|
||||
|
@ -24,7 +33,7 @@ gulp.task('cp', function () {
|
|||
|
||||
gulp.task('pygments', function () {
|
||||
return gulp.src(['./static/pygments/*.css', '!./static/pygments/*min.css'])
|
||||
.pipe(minify())
|
||||
.pipe(cssnano())
|
||||
.pipe(rename({
|
||||
extname: '.min.css'
|
||||
}))
|
||||
|
@ -32,4 +41,4 @@ gulp.task('pygments', function () {
|
|||
});
|
||||
|
||||
|
||||
gulp.task('default', gulp.series(['less', 'cp', 'pygments']));
|
||||
gulp.task('default', gulp.series(['less', 'uglify', 'cp', 'pygments']));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue