Permalink
Browse files

add wiredep support.

  • Loading branch information...
Stephen Sawchuk
Stephen Sawchuk committed Feb 26, 2014
1 parent 4c6dd1d commit f594d53a2f558208ab011398a96a9de4b1f853b1
Showing with 27 additions and 3 deletions.
  1. +2 −1 app/templates/_package.json
  2. +21 −0 app/templates/gulpfile.js
  3. +4 −2 app/templates/main.scss
@@ -15,7 +15,8 @@
"gulp-size": "~0.1.2",
"gulp-connect": "~1.0.0",
"gulp-useref": "~0.1.2",
"gulp-bundle": "~0.2.0"
"gulp-bundle": "~0.2.0",
"wiredep": "~1.1.0"
},
"engines": {
"node": ">=0.10.0"
View
@@ -2,6 +2,7 @@
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
var gulp = require('gulp');
var wiredep = require('wiredep').stream;
// Load plugins
var $ = require('gulp-load-plugins')();
@@ -70,6 +71,23 @@ gulp.task('connect', $.connect.server({
livereload: true
}));
// Inject Bower components
gulp.task('wiredep', function () {
gulp.src('app/styles/*.scss')
.pipe(wiredep({
directory: 'app/bower_components',
ignorePath: 'app/bower_components/'
}))
.pipe(gulp.dest('app/styles'));
gulp.src('app/*.html')
.pipe(wiredep({
directory: 'app/bower_components',
ignorePath: 'app/'
}))
.pipe(gulp.dest('app'));
});
// Watch
gulp.task('watch', ['connect'], function () {
// Watch for changes in `app` folder
@@ -92,4 +110,7 @@ gulp.task('watch', ['connect'], function () {
// Watch image files
gulp.watch('app/images/**/*', ['images']);
// Watch bower files
gulp.watch('app/bower_components/*', ['wiredep']);
});
View
@@ -1,6 +1,8 @@
<% if (includeBootstrap) { %>$icon-font-path: "/bower_components/bootstrap-sass/vender/assets/fonts/";
@import 'bootstrap-sass/vendor/assets/stylesheets/bootstrap';
// bower:scss
@import "bootstrap-sass/vendor/assets/stylesheets/bootstrap.scss";
// endbower
.browsehappy {
margin: 0.2em 0;
@@ -83,7 +85,7 @@ body {
.header {
margin-bottom: 30px;
}
/* Remove the bottom border on the jumbotron for visual effect */
.jumbotron {
border-bottom: 0;

0 comments on commit f594d53

Please sign in to comment.