-
-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathember-cli-build.js
64 lines (56 loc) · 1.45 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
'use strict';
const walkSync = require('walk-sync');
const path = require('path');
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
/*
Map over filenames in order to help generate the prembered
URLs for the individual deprecation article pages.
Their URL is something like `/id/project.bower-dependencies`
*/
const getDeprecationFilenames = function () {
return walkSync('content', { globs: ['**/*.md'] }).map(
(filename) => `/id/${path.basename(filename, '.md')}`
);
};
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
prember: {
urls: [
'/',
'/v6.x',
'/v5.x',
'/v4.x',
'/v3.x',
'/v2.x',
'/v1.x',
'/ember/v6.x',
'/ember/v5.x',
'/ember/v4.x',
'/ember/v3.x',
'/ember/v2.x',
'/ember/v1.x',
'/ember-data/v2.x',
'/ember-data/v3.x',
'/ember-data/v4.x',
'/ember-data/v5.x',
'/ember-cli/v2.x',
'/ember-cli/v4.x',
'/ember-cli/v5.x',
...getDeprecationFilenames(),
],
},
'ember-cli-string-helpers': {
only: ['html-safe'],
},
babel: {
plugins: [require.resolve('ember-auto-import/babel-plugin')],
},
fastboot: {
moduleWhitelist: ['algoliasearch'],
},
});
app.import('node_modules/semver-compare/index.js', {
using: [{ transformation: 'cjs', as: 'semver-compare' }],
});
return app.toTree();
};