|
1 | 1 | import funnel = require("broccoli-funnel");
|
2 |
| -import mergeTrees = require("broccoli-merge-trees"); |
3 |
| -import type { InputNode } from "broccoli-node-api"; |
4 |
| -import Filter = require("broccoli-persistent-filter"); |
5 |
| -import type { PluginOptions } from "broccoli-plugin/dist/interfaces"; |
6 | 2 | import EmberApp from "ember-cli/lib/broccoli/ember-app";
|
7 | 3 | import type Addon from "ember-cli/lib/models/addon";
|
8 | 4 | import type { AddonImplementation, ThisAddon } from "ember-cli/lib/models/addon";
|
9 | 5 | import Project from "ember-cli/lib/models/project";
|
10 | 6 |
|
11 |
| -class CSSBlocksApplicationPlugin extends Filter { |
12 |
| - appName: string; |
13 |
| - constructor(appName: string, inputNodes: InputNode[], options?: PluginOptions) { |
14 |
| - super(mergeTrees(inputNodes), options || {}); |
15 |
| - this.appName = appName; |
16 |
| - } |
17 |
| - processString(contents: string, _relativePath: string): string { |
18 |
| - return contents; |
19 |
| - } |
20 |
| - async build() { |
21 |
| - await super.build(); |
22 |
| - // console.log(`XXX ${this.appName}`); |
23 |
| - // let entries = this.input.entries(".", {globs: ["**/*"]}); |
24 |
| - // for (let entry of entries) { |
25 |
| - // console.log(entry.relativePath); |
26 |
| - // } |
27 |
| - this.output.writeFileSync( |
28 |
| - `${this.appName}/services/-css-blocks-data.js`, |
29 |
| - `// CSS Blocks Generated Data. DO NOT EDIT. |
30 |
| - export const data = {className: "it-worked"}; |
31 |
| - `); |
32 |
| - } |
33 |
| -} |
| 7 | +import { CSSBlocksApplicationPlugin } from "./brocolli-plugin"; |
34 | 8 |
|
35 | 9 | interface AddonEnvironment {
|
36 | 10 | parent: Addon | EmberApp;
|
|
0 commit comments