-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
40 lines (34 loc) · 916 Bytes
/
index.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
/* eslint-env node */
'use strict';
const mergeTrees = require('broccoli-merge-trees');
const path = require('path');
const typescript = require('broccoli-typescript-compiler').typescript;
module.exports = {
name: 'rxjs',
treeForAddon (tree) {
const rxPath = path.dirname(require.resolve('rxjs/'));
const rxTree = this.treeGenerator(rxPath);
const theTree = typescript(rxTree, {
tsconfig: {
compilerOptions: {
module: "es2015",
target: "es2015",
moduleResolution: "node",
outDir: "",
sourceMap: true,
declaration: true
},
include: [
'src/**/*.ts'
]
}
});
if (!tree) {
return this._super.treeForAddon.call(this, theTree);
}
const trees = mergeTrees([theTree, tree], {
overwrite: true
});
return this._super.treeForAddon.call(this, trees);
}
}