From bff3d3db42ef4bc56d3fc57672ac0b22c53c854f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=B7=E6=B8=A1?= Date: Thu, 29 Oct 2015 08:51:09 +0800 Subject: [PATCH] Create gulpfile.js --- gulpfile.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gulpfile.js diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..4a76723 --- /dev/null +++ b/gulpfile.js @@ -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']);