2020-03-09 18:16:44 +08:00
|
|
|
|
var gulp = require("gulp"),
|
|
|
|
|
cleanCss = require("gulp-clean-css"),
|
|
|
|
|
less = require("gulp-less");
|
|
|
|
|
|
2020-03-16 00:30:27 +08:00
|
|
|
|
var rename = require('gulp-rename');
|
|
|
|
|
|
2021-03-31 15:56:06 +08:00
|
|
|
|
gulp.task("less-default", function () {
|
|
|
|
|
return gulp.src('docs.less')
|
2020-03-09 18:16:44 +08:00
|
|
|
|
.pipe(less({ javascriptEnabled: true }))
|
|
|
|
|
.pipe(cleanCss({ compatibility: 'ie8' }))
|
2021-03-31 15:56:06 +08:00
|
|
|
|
.pipe(rename('docs.default.css'))
|
2020-03-09 18:16:44 +08:00
|
|
|
|
.pipe(gulp.dest('wwwroot/css'));
|
2021-03-31 15:56:06 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
gulp.task("less-aliyun", function () {
|
|
|
|
|
return gulp.src('docs.aliyun.less')
|
|
|
|
|
.pipe(less({ javascriptEnabled: true }))
|
|
|
|
|
.pipe(cleanCss({ compatibility: 'ie8' }))
|
|
|
|
|
.pipe(gulp.dest('wwwroot/css'));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
gulp.task("less-compact", function () {
|
|
|
|
|
return gulp.src('docs.compact.less')
|
|
|
|
|
.pipe(less({ javascriptEnabled: true }))
|
|
|
|
|
.pipe(cleanCss({ compatibility: 'ie8' }))
|
|
|
|
|
.pipe(gulp.dest('wwwroot/css'));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
gulp.task("less-dark", function () {
|
|
|
|
|
return gulp.src('docs.dark.less')
|
|
|
|
|
.pipe(less({ javascriptEnabled: true }))
|
|
|
|
|
.pipe(cleanCss({ compatibility: 'ie8' }))
|
|
|
|
|
.pipe(gulp.dest('wwwroot/css'));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
gulp.task('default', gulp.parallel('less-default', 'less-aliyun', 'less-compact', 'less-dark'), function () { });
|