gulpfile.js
var gulp =require('gulp'); //本地安装gulp所用到的地方
uglify = require('gulp-uglify');
gulp.task('jsAssets', function () {
gulp.src('/*.js') //Project Folder
.pipe(uglify())
.pipe(gulp.dest('/')); //same folder minified
});
gulp.task('default',['jsAssets']);