2 Star 0 Fork 0

g8up / jsonFormator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gulpfile.js 900 Bytes
一键复制 编辑 原始数据 按行查看 历史
g8up 提交于 2019-09-05 22:23 . build: 替换 gulp-util
// https://github.com/nimojs/gulp-book
var gulp = require('gulp');
var rename = require('gulp-rename');
var htmlReplace = require('gulp-html-replace');
const c = require('ansi-colors');
var log = require('fancy-log');
var pkg = require('./package');
gulp.task('rename', function () {
gulp.src('index.html')
.pipe(rename({
basename:'JSON 格式化工具',
suffix: 'v' + pkg.version,
extname: '.hta'
}))
.pipe(htmlReplace({ver: pkg.version }))
.pipe(gulp.dest('dist/'));
});
gulp.task('watch', function () {
gulp.watch('index.html', function (event) {
var path = event.path;
log(c.green(event.type) + ' ' + path);
gulp.src(path)
.pipe(rename({
suffix: 'v' + pkg.version,
extname: '.hta'
}))
.pipe(htmlReplace({ver: pkg.version }))
.pipe(gulp.dest('dist/'));
});
});
// 使用 gulp.task('default') 定义默认任务
gulp.task('default', ['rename']);
JavaScript
1
https://gitee.com/g8up/jsonFormator.git
git@gitee.com:g8up/jsonFormator.git
g8up
jsonFormator
jsonFormator
master

搜索帮助