1 Star 0 Fork 2

MeYang222/wxmini-promisify

forked from RHQYZ/wxmini-promisify 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gulpfile.mjs 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
RHQYZ 提交于 2022-12-02 20:04 . chore: upgrade dependencies
import gulp from 'gulp';
import gulp$babel from 'gulp-babel';
import gulp$eslint from 'gulp-eslint';
import gulp$rimraf from 'gulp-rimraf';
import gulp$stripDebug from 'gulp-strip-debug';
import gulp$uglify from 'gulp-uglify';
gulp.task('clean', () => {
return gulp
.src(['dist/**/*.js', 'dist/**/*.js.map'], {
read: false
})
.pipe(gulp$rimraf({
force: true
}));
});
gulp.task('eslint', () => {
return gulp
.src(['src/**/*.js'])
.pipe(gulp$eslint())
.pipe(gulp$eslint.format())
.pipe(gulp$eslint.failAfterError());
});
gulp.task('dist', gulp.series('clean', () => {
const babelOptions = {
presets: [
[
'@babel/preset-env', {
modules: false
}
]
]
};
return gulp
.src(['src/**/*.js'])
.pipe(gulp$stripDebug())
.pipe(gulp$babel(babelOptions))
.pipe(gulp$uglify())
.pipe(gulp.dest('dist'));
}));
gulp.task('default', gulp.series('clean', 'dist'));
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/xyangge/wxmini-promisify.git
git@gitee.com:xyangge/wxmini-promisify.git
xyangge
wxmini-promisify
wxmini-promisify
main

搜索帮助