-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.js
53 lines (44 loc) · 1.91 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* jshint node: true */
'use strict';
module.exports = {
name: 'ember-cli-dynamic-forms',
included: function (app) {
this._super.included(app);
app.options = app.options || {}; // ensure options is actually set to prevent undefined errors
var options = app.options['ember-cli-dynamic-forms'] || {}; // ensure we have an options object at the very least
// opt out early if we don't want any assets
if('includeAssets' in options && !options.includeAssets) {
return;
}
app.import(app.bowerDirectory + '/handlebars/handlebars.js');
// include bootstrap assets unless explicitly told otherwise
if(!('includeBootstrapAssets' in options) || options.includeBootstrapAssets) {
app.import(app.bowerDirectory + '/bootstrap/dist/js/bootstrap.js');
app.import(app.bowerDirectory + '/bootstrap/dist/css/bootstrap.css');
app.import('bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff', {
destDir: 'fonts'
});
app.import('bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot', {
destDir: 'fonts'
});
app.import('bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg', {
destDir: 'fonts'
});
app.import('bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf', {
destDir: 'fonts'
});
app.import('bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2', {
destDir: 'fonts'
});
}
app.import(app.bowerDirectory + '/alpaca/dist/alpaca/bootstrap/alpaca.js');
// include alpaca styles unless explicitly told otherwise
if(!('includeAlpacaStyles' in options) || options.includeAlpacaStyles) {
app.import(app.bowerDirectory + '/alpaca/dist/alpaca/bootstrap/alpaca.css');
}
app.import(app.bowerDirectory + '/lodash/lodash.js');
},
isDevelopingAddon: function () {
return true;
}
};