代码拉取完成,页面将自动刷新
同步操作将从 ZKEASOFT/ZKEACMS 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
var gulp = require('gulp');
var less = require('gulp-less');
var sourcemaps = require('gulp-sourcemaps');
var cleanCSS = require('gulp-clean-css');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify-es').default;
var saveLicense = require('uglify-save-license');
function handleError(err) {
console.log(err.toString());
this.emit('end');
}
function compileTheme(theme) {
gulp.src('src/ZKEACMS.WebHost/wwwroot/themes/' + theme + '/css/Theme.less')
.pipe(sourcemaps.init())
.pipe(less())
.on("error", handleError)
.pipe(sourcemaps.write())
.pipe(gulp.dest(function (f) {
return f.base;
}))
.pipe(cleanCSS({ inline: ['none'] }))
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest(function (f) {
return f.base;
}));
}
function themeFilter(theme) {
return 'src/ZKEACMS.WebHost/wwwroot/themes/' + theme + '/css/*.less';
}
gulp.task('compile-theme:default', function (cb) {
compileTheme('Default');
cb();
});
gulp.task('watch:minify-js-css', function (cb) {
gulp.watch(themeFilter('Default'), gulp.series('compile-theme:default'));
var jsWatch = gulp.watch(['src/**/*.js', '!src/**/*.min.js']);
jsWatch.on('change', function (path, stats) {
console.log(`Minify ${path}`);
gulp.src(path)
.pipe(uglify({ output: { comments: saveLicense } }))
.on("error", handleError)
.pipe(rename({ suffix: ".min" }))
.pipe(gulp.dest(function (f) {
return f.base;
}));
});
var cssWatch = gulp.watch(['src/**/*.css', '!src/**/*.min.css', '!src/ZKEACMS.WebHost/wwwroot/themes/**/*.css']);
cssWatch.on('change', function (path) {
console.log(`Minify ${path}`);
gulp.src(path)
.pipe(cleanCSS({ inline: ['none'] }))
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest(function (f) {
return f.base;
}));
});
cb();
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。