Created
March 6, 2015 18:45
-
-
Save spboyer/5180a9eca4ed1b496c1b to your computer and use it in GitHub Desktop.
Gulp equivalent of grunt for VS2015 web template
This file contains 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'); | |
var mainBowerFiles = require('main-bower-files'); | |
var $ = require('gulp-load-plugins')({ | |
lazy: true | |
}); | |
gulp.task('bower', function () { | |
return $.bower() | |
}); | |
gulp.task('default', ['bower'], function () { | |
return gulp.src(mainBowerFiles()) | |
.pipe(gulp.dest("wwwroot/lib")); | |
}); |
This file contains 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
{ | |
"version": "0.0.0", | |
"name": "TestWebApp", | |
"devDependencies": { | |
"del": "^1.1.1", | |
"gulp": "^3.8.10", | |
"gulp-bower": "0.0.10", | |
"gulp-load-plugins": "^0.8.1", | |
"main-bower-files": "^2.5.0" | |
} | |
} |
as a side note, if you want a default gulpfile, happy to help there too.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should chuck rimraf. It's an external package that effectively does what node does out of the box with del. Use require('del') instead.
The bower wire-up is messy and error prone (magic strings). I recommend using wiredep here as it "just works" and works even when you add more bower files. Happy to help contribute if you want.