Skip to content

Instantly share code, notes, and snippets.

@spboyer
Created March 6, 2015 18:45
Show Gist options
  • Save spboyer/5180a9eca4ed1b496c1b to your computer and use it in GitHub Desktop.
Save spboyer/5180a9eca4ed1b496c1b to your computer and use it in GitHub Desktop.
Gulp equivalent of grunt for VS2015 web template
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"));
});
{
"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"
}
}
@johnpapa
Copy link

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.

@johnpapa
Copy link

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