1 | var plugin = require("./dist/plugin");
|
2 | var TypeScript = plugin.TypeScript;
|
3 | var MergeTrees = require("broccoli-merge-trees");
|
4 | var Funnel = require("broccoli-funnel");
|
5 |
|
6 |
|
7 | function filter(inputNode, options) {
|
8 | var passthrough = new Funnel(inputNode, {
|
9 | exclude: ["**/*.ts"],
|
10 | annotation: "TypeScript passthrough"
|
11 | });
|
12 | var filter = new Funnel(inputNode, {
|
13 | include: ["**/*.ts"],
|
14 | annotation: "TypeScript input"
|
15 | });
|
16 | return new MergeTrees([
|
17 | passthrough,
|
18 | new TypeScript(filter, options)
|
19 | ], {
|
20 | overwrite: true,
|
21 | annotation: "TypeScript passthrough + ouput"
|
22 | });
|
23 | }
|
24 |
|
25 | filter.findConfig = plugin.findConfig;
|
26 | filter.TypeScript = TypeScript;
|
27 | filter.typescript = function typescript(inputNode, options) {
|
28 | return new TypeScript(inputNode, options);
|
29 | };
|
30 |
|
31 | module.exports = filter;
|