UNPKG

846 BJavaScriptView Raw
1var plugin = require("./dist/plugin");
2var TypeScript = plugin.TypeScript;
3var MergeTrees = require("broccoli-merge-trees");
4var Funnel = require("broccoli-funnel");
5
6// Mimic filter behavior for backwards compat
7function 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
25filter.findConfig = plugin.findConfig;
26filter.TypeScript = TypeScript;
27filter.typescript = function typescript(inputNode, options) {
28 return new TypeScript(inputNode, options);
29};
30
31module.exports = filter;