Skip to content

Commit c8aa8ed

Browse files
author
zckrs
committed
Add overrides pprt in bower.json for plain CSS
Due to https://github.com/twbs/bootstrap/blob/v3.3.5/bower.json#L18 Wiredep need the right file in main pprt
1 parent b1a5baf commit c8aa8ed

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

app/templates/_bower.json

+10
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@
5656
"devDependencies": {
5757
"angular-mocks": "<%- props.angularVersion %>"
5858
},
59+
<% if (props.cssPreprocessor.key === 'none' && props.ui.key === 'bootstrap') { -%>
60+
"overrides": {
61+
"bootstrap": {
62+
"main": [
63+
"dist/css/bootstrap.css",
64+
"dist/js/bootstrap.js"
65+
]
66+
}
67+
},
68+
<% } -%>
5969
"resolutions": {
6070
<% if (props.jQuery.key === 'jquery1') { -%>
6171
"jquery": "~1.11.3",

test/template/test-bower.js

+8
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,12 @@ describe('gulp-angular bower template', function () {
177177
result.should.match(/traceur-runtime/);
178178
});
179179

180+
it('should add overrides pprt for css bootstrap', function() {
181+
model.props.ui.key = 'bootstrap';
182+
model.props.cssPreprocessor.key = 'none';
183+
184+
var result = bower(model);
185+
result.should.match(/overrides/);
186+
result.should.match(/dist\/css\/bootstrap.css/);
187+
});
180188
});

0 commit comments

Comments
 (0)