1. 程式人生 > >gulp 學習筆記2 named tasks

gulp 學習筆記2 named tasks

pts efault gpo build gulp default require styles pos

var gulp = require(‘gulp‘)
var uglify = require(‘gulp-uglify‘)
var cleancss = require(‘gulp-clean-css‘)
gulp.task(‘scripts‘,function () {
    gulp.src(‘app/js/*.js‘)
        .pipe(uglify())
        .pipe(gulp.dest(‘build/js‘))
})

gulp.task(‘styles‘,function () {
  console.log(‘run minify css‘)
})

gulp.task(
‘default‘,[‘scripts‘,‘styles‘])

gulp 學習筆記2 named tasks