forked from tsubik/splittypie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathember-cli-build.js
66 lines (61 loc) · 2.01 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
60
61
62
63
64
65
66
/*eslint-disable */
const EmberApp = require("ember-cli/lib/broccoli/ember-app");
const env = process.env.EMBER_ENV;
require("dotenv").config({
path: `.env.${env}`
});
const config = require("./config/environment")(env);
module.exports = function (defaults) {
const app = new EmberApp(defaults, {
babel: {
includePolyfill: true,
},
fingerprint: {
exclude: ["assets/icons/", "offline-support.js", "sw-toolbox.js"],
enabled: (env === "production" || env === "staging" || env === "offline"),
},
sassOptions: {
includePaths: [
"bower_components/bootstrap-sass/assets/stylesheets",
"vendor/bootstrap-paper",
],
},
minifyJS: {
options: {
exclude: ["sw-toolbox.js"]
}
},
sourcemaps: {
enabled: true,
},
svg: {
paths: [
"public/assets/icons",
]
},
inlineContent: {
"last-event": {
file: "app/last-event.html",
enabled: true,
},
analytics: {
file: "app/analytics.html",
enabled: !!config.GOOGLE_ANALYTICS_ID,
postProcess: function (content) {
return content.replace(/\{\{GOOGLE_ANALYTICS_ID\}\}/g, config.GOOGLE_ANALYTICS_ID);
},
},
rollbar: {
file: "app/rollbar.html",
enabled: config.rollbar.enabled,
postProcess: function (content) {
return content.replace(/\{\{rollbarConfig\}\}/g, JSON.stringify(config.rollbar));
}
}
},
});
app.import("bower_components/bootstrap-sass/assets/javascripts/bootstrap.js");
app.import("bower_components/mprogress/build/css/mprogress.css");
app.import("bower_components/mprogress/build/js/mprogress.js");
return app.toTree();
};