Create gulpfile.js

This commit is contained in:
迷渡 2015-10-29 08:51:09 +08:00
parent 20c859f7f9
commit bff3d3db42

15
gulpfile.js Normal file
View File

@ -0,0 +1,15 @@
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
gulp.task('uglify', function() {
gulp.src('src.js')
.pipe(uglify())
.pipe(rename(function (path) {
path.extname = ".min.js"
}))
.pipe(gulp.dest('dist'))
});
gulp.task('default', ['uglify']);