gulpfile.js 498 B

123456789101112131415161718
  1. /* buildfile for jquery.form plugin */
  2. var gulp = require('gulp'),
  3. concat = require('gulp-concat'),
  4. jshint = require('gulp-jshint'),
  5. uglify = require('gulp-uglify');
  6. gulp.task('default', function() {
  7. gulp.src(['jquery.form.js'])
  8. .pipe(jshint())
  9. .pipe(jshint.reporter('default'))
  10. .pipe(uglify({ preserveComments: 'some' }))
  11. .pipe(concat('jquery.form.min.js'))
  12. .pipe(gulp.dest('.'));
  13. });
  14. gulp.task('watch', function () {
  15. gulp.watch('jquery.form.js', ['default']);
  16. });