first commit

This commit is contained in:
编码猿
2024-09-27 01:11:00 +08:00
commit ebaaceaa05
122 changed files with 11359 additions and 0 deletions

41
gulpfile.js Normal file
View File

@@ -0,0 +1,41 @@
const gulp = require('gulp')
// 编译jade文件为hrml
const jade = require('gulp-jade')
// gulp 文件监听
const watch = require('gulp-watch')
// 处理gulp错误防止程序报错终止
const plumber = require('gulp-plumber')
const path = require('path')
/**
* 编译jade为html
*/
gulp.task('jade', function () {
return gulp.src("./src/view/main/*.jade")
.pipe(plumber({
errHandler: e => {
gutil.beep()
gutil.log(e)
}
}))
.pipe(jade({
pretty: true
}))
.pipe(gulp.dest("./dist/view/"))
})
gulp.task('copy', function() {
return gulp.src(['src/view/assets/**/*'], { base: 'src/' })
.pipe(gulp.dest('dist/'))
});
/**
* 监听用户在 src/ 的所有文件操作
*/
gulp.task('file', function () {
gulp.watch('src/view/**/*', gulp.parallel('jade'))
gulp.watch('src/view/assets/**/*', gulp.parallel('copy'))
});
gulp.task('default', gulp.series('file'))