123456789101112131415161718192021222324252627 |
- 'use strict';
- var gulp = require('gulp');
- var watch = require('gulp-watch');
- var jsmin = require('gulp-jsmin');
- var rename = require('gulp-rename');
- function handleError(err) {
- console.log(err.toString());
- // this.emit('end');
- }
- gulp.task('scripts', function () {
- gulp.src('./js/*.js')
- .pipe(jsmin())
- .pipe(rename({suffix: '.min'}))
- .pipe(gulp.dest('./js/dist/'));
- });
- gulp.task('default', function () {
- });
- // default gulp task
- gulp.task('default', ['scripts'], function() {
- gulp.watch('./js/*.js', ['scripts']);
- });
|