forked from ilios/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ember-cli-build.js
105 lines (99 loc) · 2.57 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
'use strict';
/* eslint camelcase: 0 */
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const broccoliAssetRevDefaults = require( 'broccoli-asset-rev/lib/default-options' );
module.exports = function(defaults) {
const env = EmberApp.env() || 'development';
const isProductionLikeBuild = ['production', 'staging', 'preview'].indexOf(env) > -1;
const isTestBuild = env === 'test';
let app = new EmberApp(defaults, {
fingerprint: {
extensions: broccoliAssetRevDefaults.extensions.concat(['webmanifest', 'svg']),
enabled: isProductionLikeBuild,
},
sourcemaps: {
enabled: true,
},
minifyCSS: { enabled: isProductionLikeBuild },
minifyJS: { enabled: isProductionLikeBuild },
tests: env.EMBER_CLI_TEST_COMMAND || !isProductionLikeBuild,
hinting: isTestBuild,
babel: {
plugins: [ require('ember-auto-import/babel-plugin') ]
},
'ember-cli-image-transformer': {
images: [
{
inputFilename: 'lib/images/sunburst.svg',
outputFileName: 'sunburst-white-background',
background: {r: 255, g: 255, b: 255, alpha: 1},
convertTo: 'png',
sizes: [48, 96, 180, 192],
},
{
inputFilename: 'lib/images/sunburst.svg',
outputFileName: 'sunburst-transparent',
convertTo: 'png',
sizes: [16, 32, 48, 96, 150, 512],
},
]
},
'ember-cli-qunit': {
useLintTree: false
},
'ember-froala-editor': {
languages: ['fr','es'],
plugins: ['lists', 'code_view', 'link'],
themes: 'gray'
},
'ember-service-worker': {
immediateClaim: true,
versionStrategy: 'every-build',
},
'esw-cache-first': {
version: '4',
patterns: [
'https://fonts.gstatic.com/(.+)',
],
},
newVersion: {
enabled: true,
useAppVersion: true
},
'ember-cli-uglify': {
uglify: {
compress: {
collapse_vars: false
}
}
},
postcssOptions: {
compile: {
extension: 'scss',
enabled: true,
parser: require('postcss-scss'),
plugins: [
{
module: require('@csstools/postcss-sass'),
},
]
},
filter: {
enabled: true,
plugins: [
{
module: require('autoprefixer'),
}
]
}
},
autoImport: {
publicAssetURL: '/assets'
},
'ember-fetch': {
preferNative: true
},
});
app.import('node_modules/normalize.css/normalize.css');
return app.toTree();
};