-
Notifications
You must be signed in to change notification settings - Fork 3
/
Brocfile.js
54 lines (43 loc) · 1.46 KB
/
Brocfile.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
54
var EmberApp = require('ember-cli/lib/broccoli/ember-app'),
pickFiles = require('broccoli-static-compiler'),
mergeTrees = require('broccoli-merge-trees'),
writeManifest = require('broccoli-manifest'),
bootstrapDir = 'vendor/bootstrap-sass-official/assets',
bootstrapComponents = ['dropdown', 'tooltip', 'transition', 'collapse'];
var app = new EmberApp({
minifyCSS: {
enabled: true
},
fingerprint: {
exclude: ['fonts', 'assets/images/parties']
},
getEnvJSON: require('./config/environment'),
});
var fontDestDir = '/assets/bootstrap';
// Adds 3rd script like GA
if (app.env === 'production') {
app.options.inlineContent = {
'google-analytics' : 'vendor/ga/google-analytics.js'
};
}
for (var index in bootstrapComponents) {
app.import(bootstrapDir + '/javascripts/bootstrap/' + bootstrapComponents[index] + '.js');
}
var extraAssets = pickFiles(bootstrapDir + '/fonts/bootstrap', {
srcDir: '/',
destDir: fontDestDir
});
app.import('vendor/moment/moment.js');
app.import('vendor/moment/lang/fr.js');
app.import('vendor/spinjs/spin.js');
app.import('vendor/spinjs/jquery.spin.js');
app.import('vendor/PACE/pace.js');
app.import('vendor/PACE/themes/pace-theme-flash.css');
var tree = mergeTrees([app.toTree(), extraAssets]),
finalTree = tree;
if (app.env === 'production') {
finalTree = mergeTrees([tree, writeManifest(tree)]);
} else {
finalTree = tree;
}
module.exports = finalTree;