mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
update test 更新文章 1. 测试新主题 挖坑 挖坑 update config 更新文章 1. 简易FaaS平台 更新文章 1. 修复错误 更新文章:Promise信任问题 update theme 1. 合并js post: update notedly fix: update faas feature: change theme * fix: comment * feature: pgp * fix: delete local file post: update darkmode update: update dependencies fix: navbar in post incorrect height * pre code adapt to dark mode update new post useCallback update dependencies new post tiny router * add static files update vue tiny router 添加备案 * 更新依赖 add post Add ignore file
32 lines
771 B
JavaScript
32 lines
771 B
JavaScript
const { series, parallel } = require('gulp');
|
|
const { src, dest } = require('gulp');
|
|
const cleanCSS = require('gulp-clean-css');
|
|
const htmlmin = require('gulp-htmlmin');
|
|
const terser = require('gulp-terser');
|
|
const htmlclean = require('gulp-htmlclean');
|
|
|
|
function html() {
|
|
return src('./public/**/*.html')
|
|
.pipe(htmlclean())
|
|
.pipe(
|
|
htmlmin({
|
|
collapseWhitespace: true,
|
|
removeComments: true,
|
|
minifyJS: true,
|
|
minifyCSS: true,
|
|
minifyURLs: true,
|
|
})
|
|
)
|
|
.pipe(dest('./public'));
|
|
}
|
|
|
|
function css() {
|
|
return src('./public/**/*.css').pipe(cleanCSS()).pipe(dest('./public'));
|
|
}
|
|
|
|
function js() {
|
|
return src('public/**/*.js').pipe(terser()).pipe(dest('./public'));
|
|
}
|
|
|
|
exports.default = parallel(html, css, js);
|