-
-
Notifications
You must be signed in to change notification settings - Fork 142
/
ember-cli-build.js
66 lines (57 loc) · 1.55 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
'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
const Project = require('ember-cli/lib/models/project');
const MergeTrees = require('broccoli-merge-trees');
const Funnel = require('broccoli-funnel');
const path = require('path');
const styleDir = path.join(__dirname, 'addon', 'styles');
module.exports = function (defaults) {
let project = Project.closestSync(process.cwd());
project.pkg['ember-addon'].paths = ['sandbox'];
defaults.project = project;
var app = new EmberAddon(defaults, {
project,
vendorFiles: { 'jquery.js': null, 'app-shims.js': null },
// Workaround for https://github.com/ember-cli/ember-cli/issues/8075
'ember-cli-terser': {
terser: {
compress: {
collapse_vars: false,
},
},
},
'ember-cli-addon-docs': {
projects: {
sandbox: new MergeTrees([
new Funnel('sandbox/app', { destDir: 'sandbox' }),
new Funnel('sandbox', {
include: ['package.json', 'README.md'],
}),
]),
},
},
postcssOptions: {
compile: {
extension: 'scss',
enabled: true,
parser: require('postcss-scss'),
plugins: [
{
module: require('@csstools/postcss-sass'),
options: {
includePaths: [styleDir],
},
},
],
},
},
});
const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
});
};