-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathember-cli-build.js
59 lines (55 loc) · 1.64 KB
/
ember-cli-build.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
55
56
57
58
59
'use strict';
var fs = require('fs');
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const env = EmberApp.env();
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
sassOptions: {
includePaths: [
],
sourceMap: true,
},
fingerprint: {
enabled: env === 'production',
prepend: process.env.FINGERPRINT_PREPEND_URL
},
sourcemaps: {
enabled: true,
},
storeConfigInMeta: env !== 'development',
'mirage-support': {
includeAll: true
},
svgJar: {
sourceDirs: [
'public',
'node_modules/nypr-icons/public'
],
},
useWaypoints: true,
'ember-cli-babel': { includePolyfill: true },
});
try {
fs.accessSync('vendor/modernizr/modernizr-build.js');
app.import('vendor/modernizr/modernizr-build.js', {
using: [{transformation: 'fastbootShim'}],
});
} catch(e) {
console.log('there was a problem importing the modernizr build. please run grunt modernizr:dist first.');
}
app.import('node_modules/normalize.css/normalize.css');
app.import('node_modules/jquery-migrate/dist/jquery-migrate.min.js', {
using: [{transformation: 'fastbootShim'}],
});
app.import({
development: 'node_modules/imagesloaded/imagesloaded.pkgd.js',
production: 'node_modules/imagesloaded/imagesloaded.pkgd.min.js',
}, {
using: [{transformation: 'fastbootShim'}]
});
// All legacy JS modules that are directly called from this ember
// app should be imported into the app's own build here. Notice that
// these are symlinked to their original locations in the puppy
// source.
return app.toTree();
};