forked from mmun/ember-component-attributes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
32 lines (26 loc) · 745 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
/* eslint-env node */
"use strict";
module.exports = {
name: "ember-component-attributes",
setupPreprocessorRegistry(type, registry) {
registry.add("htmlbars-ast-plugin", {
name: "component-attributes",
plugin: require("./lib/component-attributes-transform"),
baseDir: function() {
return __dirname;
}
});
},
included() {
this.import("vendor/ember-component-attributes/index.js");
},
treeForVendor(rawVendorTree) {
let babelAddon = this.addons.find(addon => addon.name === "ember-cli-babel");
let transpiledVendorTree = babelAddon.transpileTree(rawVendorTree, {
"ember-cli-babel": {
compileModules: false
}
});
return transpiledVendorTree;
}
};