-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathember-cli-build.js
More file actions
57 lines (51 loc) · 1.19 KB
/
ember-cli-build.js
File metadata and controls
57 lines (51 loc) · 1.19 KB
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
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const environment = EmberApp.env();
const isProduction = environment === 'production';
function postcssPlugins() {
var plugins = [
{
module: require('postcss-easy-import')
},
{
module: require('postcss-custom-properties')
},
{
module: require('postcss-color-function')
},
{
module: require('autoprefixer'),
options: {
browsers: ['last 2 versions']
}
}
];
if (isProduction) {
plugins.push({
module: require('cssnano')
});
}
return plugins;
}
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
postcssOptions: {
compile: {
enabled: true,
plugins: postcssPlugins()
}
},
nodeAssets: {
'jquery-deparam': {
import: ['jquery-deparam.js']
},
moment: {
import: ['moment.js']
},
'moment-timezone': {
import: ['builds/moment-timezone-with-data.js']
},
},
});
app.import('bower_components/validator-js/validator.js');
return app.toTree();
};