Ai
1 Star 7 Fork 1

Steven/appiron-i18n-cli

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gulpfile.js 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
dbx 提交于 2022-08-02 17:55 +08:00 . feat:兼容vue2,3版本
const gulp = require('gulp');
const cleanDir = require('gulp-clean');
const babel = require('gulp-babel');
const uglify = require('gulp-uglify');
const rename = require('gulp-rename');
const distDir = './dist';
gulp.task('clean', function (callback) {
return gulp.src(distDir, { read: false, allowEmpty: true }).pipe(cleanDir());
});
gulp.task('build:lib', function (callback) {
return gulp
.src('lib/*.js')
.pipe(
babel({
presets: ['@babel/env'],
})
)
.pipe(uglify())
.pipe(gulp.dest(`${distDir}/lib`));
});
gulp.task('build:bin', function (callback) {
return gulp
.src('bin/*.js')
.pipe(
babel({
presets: ['@babel/env'],
})
)
.pipe(uglify())
.pipe(gulp.dest(`${distDir}/bin`));
});
gulp.task('copy', function (callback) {
return gulp.src(['./README.md']).pipe(gulp.dest(distDir));
});
gulp.task('copyJson', function (callback) {
return gulp
.src(['./package.prod.json'])
.pipe(rename('package.json'))
.pipe(gulp.dest(distDir));
});
gulp.task('copyImg', function (callback) {
return gulp.src(['./img/**']).pipe(gulp.dest(`${distDir}/img`));
});
exports.default = gulp.series([
'clean',
'build:lib',
'build:bin',
'copy',
'copyJson',
]);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/anyF/appiron-i18n-cli.git
git@gitee.com:anyF/appiron-i18n-cli.git
anyF
appiron-i18n-cli
appiron-i18n-cli
master

搜索帮助