Skip to content

Commit

Permalink
remove the condition on the inclusion of vendor.css
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiip committed Mar 7, 2015
1 parent dc140cb commit 32dfb71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
6 changes: 2 additions & 4 deletions app/templates/src/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->

<% if (props.ui.key !== 'none') { %>
<!-- build:css({<%= props.paths.tmp %>/serve,<%= props.paths.src %>}) styles/vendor.css -->
<% if (isVendorStylesPreprocessed) { %>
<link rel="stylesheet" href="app/vendor.css">
<% } else if (props.ui.key === 'bootstrap') { %>
<link rel="stylesheet" href="<%= computedPaths.appToBower %>/bower_components/bootstrap/dist/css/bootstrap.css">
<% } %>
<!-- bower:css -->
<!-- run `gulp wiredep` to automaticaly populate bower styles dependencies -->
<!-- run `gulp inject` to automaticaly populate bower styles dependencies -->
<!-- endbower -->
<!-- endbuild -->
<% } %>

<!-- build:css({<%= props.paths.tmp %>/serve,<%= props.paths.src %>}) styles/app.css -->
<!-- inject:css -->
Expand Down Expand Up @@ -51,7 +49,7 @@

<!-- build:js(<%= props.paths.src %>) scripts/vendor.js -->
<!-- bower:js -->
<!-- run `gulp wiredep` to automaticaly populate bower script dependencies -->
<!-- run `gulp inject` to automaticaly populate bower script dependencies -->
<!-- endbower -->
<!-- endbuild -->

Expand Down
8 changes: 1 addition & 7 deletions test/template/test-index-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,12 @@ describe('gulp-angular index js template', function () {
});

it('should insert the vendor build block depending of data', function() {
model.props.ui.key = 'none';
model.props.ui.key = 'bootstrap';
model.props.paths.src = 'src';
model.props.paths.tmp = 'tmp';
model.computedPaths.appToBower = 'appToBower';
model.isVendorStylesPreprocessed = false;

var result = indexHtml(model);
result.should.not.match(/<!-- build:css\(.*?\) styles\/vendor\.css -->/);
result.should.not.match(/<!-- bower:css/);

model.props.ui.key = 'bootstrap';
result = indexHtml(model);
result.should.match(/<!-- build:css\({tmp\/serve,src}\) styles\/vendor\.css -->/);
result.should.match(/<!-- bower:css/);
result.should.match(/href="appToBower\/bower_components/);
Expand Down

0 comments on commit 32dfb71

Please sign in to comment.