gulpfile.js 333 B

1234567891011121314
  1. var gulp = require('gulp'),
  2. uglify = require('gulp-uglify'),
  3. rename = require('gulp-rename');
  4. gulp.task('compress', function() {
  5. gulp.src('readmore.js')
  6. .pipe(uglify({
  7. mangle: true,
  8. compress: true,
  9. preserveComments: 'some'
  10. }))
  11. .pipe(rename('readmore.min.js'))
  12. .pipe(gulp.dest('./'));
  13. });