Created
June 25, 2015 15:59
-
-
Save ThatRendle/a896ce8bd4522972329d to your computer and use it in GitHub Desktop.
Gulp to copy js plus minified version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
hint = require('gulp-jshint'), | |
uglify = require('gulp-uglify'), | |
rename = require('gulp-rename'); | |
gulp.task('lint', function() { | |
return gulp.src(['Scripts/**/*.js']) | |
.pipe(hint()); | |
}); | |
gulp.task('build-js', ['lint'], function() { | |
return gulp.src(['Scripts/**/*.js']) | |
.pipe(gulp.dest('wwwroot/js')) | |
.pipe(uglify()) | |
.pipe(rename(function(path) { | |
path.basename += '.min'; | |
}) | |
.pipe(gulp.dest('wwwroot/js')); | |
}); | |
gulp.task('default', ['build-js']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you missed closing bracket