Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Commit

Permalink
Fix initial wiredep run
Browse files Browse the repository at this point in the history
  • Loading branch information
silvenon committed Jun 28, 2015
1 parent e41368f commit 5fb6e01
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
12 changes: 5 additions & 7 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,19 +318,17 @@ module.exports = generators.Base.extend({
// wire Bower packages to .html
wiredep({
bowerJson: bowerJson,
directory: 'bower_components',
exclude: ['bootstrap-sass', 'bootstrap.js'],
ignorePath: /^(\.\.\/)*\.\./,
src: 'app/index.html'
src: 'app/index.html',
exclude: ['bootstrap.js'],
ignorePath: /^app\/|\.\.\//
});

if (this.includeSass) {
// wire Bower packages to .scss
wiredep({
bowerJson: bowerJson,
directory: 'bower_components',
ignorePath: /^(\.\.\/)+/,
src: 'app/styles/*.scss'
src: 'app/styles/*.scss',
ignorePath: /(\.\.\/){1,2}bower_components\//
});
}
}
Expand Down
9 changes: 5 additions & 4 deletions app/templates/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,11 @@ module.exports = function (grunt) {
// Automatically inject Bower components into the HTML file
wiredep: {
app: {
ignorePath: /^<%%= config.app %>\/|\.\.\//,
src: ['<%%= config.app %>/index.html']<% if (includeBootstrap) { %>,<% if (includeSass) { %>
exclude: ['bower_components/bootstrap-sass/assets/javascripts/bootstrap.js']<% } else { %>
exclude: ['bower_components/bootstrap/dist/js/bootstrap.js']<% } } %>
src: ['<%%= config.app %>/index.html'],
<% if (includeBootstrap) { -%>
exclude: ['bootstrap.js'],
<% } -%>
ignorePath: /^<%%= config.app %>\/|\.\.\//
}<% if (includeSass) { %>,
sass: {
src: ['<%%= config.app %>/styles/{,*/}*.{scss,sass}'],
Expand Down

0 comments on commit 5fb6e01

Please sign in to comment.