1 Star 0 Fork 183

狂飙的小蜗牛 / iNotify

forked from 小弟调调 / iNotify
暂停
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gulpfile.js 694 Bytes
一键复制 编辑 原始数据 按行查看 历史
小弟调调 提交于 2015-05-07 16:41 . 添加gulp来压缩js
var gulp = require('gulp');
uglify = require('gulp-uglify'),
rename = require('gulp-rename')
watch = require('gulp-watch')
//默认执行default任务,并执行监听任务
gulp.task('default', ['watch'], function() {
// gulp.start('styles', 'scripts', 'images');
});
//watch任务:侦听js文件执行 build 任务
gulp.task('watch', function () {
gulp.watch('src/*.js', ['build']);//侦听js文件执行 build 任务
});
//build任务:压缩js | js重命名 | 压缩
gulp.task('build', function() {
gulp.src('./src/iNotify.js')
.pipe(uglify())
.pipe(rename({
extname:'.min.js'
}))
.pipe(gulp.dest('./build/'));
});
1
https://gitee.com/ihotte/iNotify.git
git@gitee.com:ihotte/iNotify.git
ihotte
iNotify
iNotify
master

搜索帮助