Skip to content

Commit fbe6444

Browse files
authored
Merge pull request #87 from ppcano/auto-configure-bootstrap
Configure automatically the `ember-cli-bootstrap` addon
2 parents 776f44d + 0772f14 commit fbe6444

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

ember-cli-build.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
44

55
module.exports = function(defaults) {
66
let app = new EmberAddon(defaults, {
7-
'ember-bootstrap': {
8-
bootstrapVersion: 4,
9-
importBootstrapFont: false,
10-
importBootstrapCSS: false
11-
},
127
svgJar: {
138
sourceDirs: [
149
'public',

index.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,21 @@ module.exports = {
1818
]
1919
},
2020
googleFonts: [
21-
'Roboto:400,700'
21+
'Roboto:400,700'
2222
],
2323
},
2424

25-
included() {
25+
included(app, parentAddon) {
26+
let target = (app || parentAddon);
27+
target.options = target.options || {};
28+
29+
const defaultEmberBootStrapOptions = {
30+
bootstrapVersion: 4,
31+
importBootstrapFont: false,
32+
importBootstrapCSS: false
33+
};
34+
target.options['ember-bootstrap'] = target.options['ember-bootstrap'] || defaultEmberBootStrapOptions;
35+
2636
this._super.included.apply(this, arguments);
2737
},
2838

0 commit comments

Comments
 (0)