forked from sir-dunxalot/ember-tooltips
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
28 lines (22 loc) · 700 Bytes
/
index.js
File metadata and controls
28 lines (22 loc) · 700 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
'use strict';
const MergedTrees = require('broccoli-merge-trees');
module.exports = {
name: require('./package').name,
treeForAddonTestSupport(tree) {
const writeFile = require('broccoli-file-creator');
const optionalFeatures = this.project.findAddonByName(
'@ember/optional-features'
);
const testType =
optionalFeatures &&
!optionalFeatures.isFeatureEnabled('jquery-integration')
? 'dom'
: 'jquery';
const reexportTree = writeFile(
'index.js',
`export * from '${this.moduleName()}/test-support/${testType}';`
);
const mergedTree = new MergedTrees([tree, reexportTree]);
return this._super(mergedTree);
},
};