-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.js
More file actions
38 lines (27 loc) · 762 Bytes
/
index.js
File metadata and controls
38 lines (27 loc) · 762 Bytes
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
/* eslint-env node */
'use strict';
var path = require('path');
var Funnel = require('broccoli-funnel');
var MergeTrees = require('broccoli-merge-trees');
var tdDirectory = path.resolve(path.dirname(require.resolve('testdouble')), '..');
module.exports = {
name: 'ember-cli-testdouble',
treeForVendor(vendorTree) {
var trees = [];
if (vendorTree) {
trees.push(vendorTree);
}
trees.push(new Funnel(tdDirectory));
return new MergeTrees(trees);
},
included(app) {
this._super.included.apply(this, arguments);
var vendorPath = this.treePaths.vendor;
app.import(`${vendorPath}/dist/testdouble.js`, {
type: 'test',
using: [
{ transformation: 'amd', as: 'testdouble' }
]
});
}
};