hustxiaoc / gulp-minify

minify js plugin for gulp
BSD 2-Clause "Simplified" License
65 stars 20 forks source link

Doesn't update minified file on re-compiling. #22

Open strawberry-choco opened 7 years ago

strawberry-choco commented 7 years ago

After changing some code in my Javascript file and re-compiling the code, the minified version of it does not get updated even though the debug version does. My gulp-file:

var minify = require('gulp-minify');
gulp.task('jsCompress', function() {
  return gulp.src('./js/*.js')
    .pipe(minify({
      ext: {
        src: '.debug.js',
        min: '.min.js'
      },
      mangle: false,
      compress: false,
      ignoreFiles: ['.combo.js', '*.min.js', '*.debug.js']
    }))
    .pipe(gulp.dest('./js')) //same directory as the source directory
});
gulp.task('default', ['jsCompress']);