const Gulp = require('gulp');
const Babel = require('gulp-babel');
const Concat = require('gulp-concat');
+const Rename = require('gulp-rename');
+const Uglify = require('gulp-uglify');
Gulp.task('build', function() {
Gulp.src([
presets: ['es2015']
}))
.pipe(Concat('serpentity.js'))
+ .pipe(Gulp.dest('dist'))
+ .pipe(Uglify())
+ .pipe(Rename({
+ suffix: '.min'
+ }))
.pipe(Gulp.dest('dist'));
});
"babel-preset-es2015": "6.6.x",
"gulp": "3.9.x",
"gulp-babel": "6.1.x",
- "gulp-concat": "2.6.x"
+ "gulp-concat": "2.6.x",
+ "gulp-rename": "1.2.x",
+ "gulp-uglify": "1.5.x"
},
"engines": {
"node": ">= 4.0.0"