@embroider/addon-dev 2.0.0 → 3.0.0-unstable.00ec2e7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -13
- package/src/commands.js +0 -0
- package/src/rollup-public-assets.d.ts +5 -0
- package/src/rollup-public-assets.js +32 -0
- package/src/rollup-public-assets.js.map +1 -0
- package/src/rollup.d.ts +5 -1
- package/src/rollup.js +4 -0
- package/src/rollup.js.map +1 -1
- package/src/template-transform-plugin.d.ts +0 -17
- package/src/template-transform-plugin.js +0 -30
- package/src/template-transform-plugin.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embroider/addon-dev",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-unstable.00ec2e7",
|
|
4
4
|
"description": "Utilities for addon authors",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
16
16
|
"./template-colocation-plugin": "./src/template-colocation-plugin.js",
|
|
17
|
-
"./template-transform-plugin": "./src/template-transform-plugin.js",
|
|
18
17
|
"./rollup": "./src/rollup.js"
|
|
19
18
|
},
|
|
20
19
|
"files": [
|
|
@@ -24,11 +23,10 @@
|
|
|
24
23
|
"src/**/*.js.map"
|
|
25
24
|
],
|
|
26
25
|
"scripts": {
|
|
27
|
-
"xprepare": "tsc",
|
|
28
26
|
"test": "jest"
|
|
29
27
|
},
|
|
30
28
|
"dependencies": {
|
|
31
|
-
"@embroider/core": "
|
|
29
|
+
"@embroider/core": "2.1.1-unstable.00ec2e7",
|
|
32
30
|
"@rollup/pluginutils": "^4.1.1",
|
|
33
31
|
"assert-never": "^1.2.1",
|
|
34
32
|
"fs-extra": "^10.0.0",
|
|
@@ -45,15 +43,8 @@
|
|
|
45
43
|
"@types/minimatch": "^3.0.4",
|
|
46
44
|
"@types/yargs": "^17.0.3",
|
|
47
45
|
"rollup": "^2.58.0",
|
|
48
|
-
"tmp": "^0.1.0"
|
|
49
|
-
|
|
50
|
-
"peerDependencies": {
|
|
51
|
-
"ember-source": "*"
|
|
52
|
-
},
|
|
53
|
-
"peerDependenciesMeta": {
|
|
54
|
-
"ember-source": {
|
|
55
|
-
"optional": true
|
|
56
|
-
}
|
|
46
|
+
"tmp": "^0.1.0",
|
|
47
|
+
"typescript": "*"
|
|
57
48
|
},
|
|
58
49
|
"engines": {
|
|
59
50
|
"node": "12.* || 14.* || >= 16"
|
package/src/commands.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_extra_1 = require("fs-extra");
|
|
7
|
+
const walk_sync_1 = __importDefault(require("walk-sync"));
|
|
8
|
+
function publicAssets(path, opts) {
|
|
9
|
+
const includeGlobPatterns = opts === null || opts === void 0 ? void 0 : opts.include;
|
|
10
|
+
const excludedGlobPatterns = (opts === null || opts === void 0 ? void 0 : opts.exclude) || [];
|
|
11
|
+
return {
|
|
12
|
+
name: 'public-assets-bundler',
|
|
13
|
+
generateBundle() {
|
|
14
|
+
let pkg = (0, fs_extra_1.readJsonSync)('package.json');
|
|
15
|
+
const filenames = (0, walk_sync_1.default)(path, {
|
|
16
|
+
directories: false,
|
|
17
|
+
globs: includeGlobPatterns,
|
|
18
|
+
ignore: excludedGlobPatterns,
|
|
19
|
+
});
|
|
20
|
+
const publicAssets = filenames.reduce((acc, v) => {
|
|
21
|
+
acc[`./${path}/${v}`] = ['/', pkg.name, '/', path, '/', v].join('');
|
|
22
|
+
return acc;
|
|
23
|
+
}, {});
|
|
24
|
+
pkg['ember-addon'] = Object.assign({}, pkg['ember-addon'], {
|
|
25
|
+
'public-assets': publicAssets,
|
|
26
|
+
});
|
|
27
|
+
(0, fs_extra_1.writeJsonSync)('package.json', pkg, { spaces: 2 });
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
exports.default = publicAssets;
|
|
32
|
+
//# sourceMappingURL=rollup-public-assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rollup-public-assets.js","sourceRoot":"","sources":["rollup-public-assets.ts"],"names":[],"mappings":";;;;;AAAA,uCAAuD;AACvD,0DAAiC;AAGjC,SAAwB,YAAY,CAClC,IAAY,EACZ,IAA8C;IAE9C,MAAM,mBAAmB,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC;IAC1C,MAAM,oBAAoB,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,KAAI,EAAE,CAAC;IAEjD,OAAO;QACL,IAAI,EAAE,uBAAuB;QAC7B,cAAc;YACZ,IAAI,GAAG,GAAG,IAAA,uBAAY,EAAC,cAAc,CAAC,CAAC;YACvC,MAAM,SAAS,GAAG,IAAA,mBAAQ,EAAC,IAAI,EAAE;gBAC/B,WAAW,EAAE,KAAK;gBAClB,KAAK,EAAE,mBAAmB;gBAC1B,MAAM,EAAE,oBAAoB;aAC7B,CAAC,CAAC;YACH,MAAM,YAAY,GAA2B,SAAS,CAAC,MAAM,CAC3D,CAAC,GAA2B,EAAE,CAAC,EAA0B,EAAE;gBACzD,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACpE,OAAO,GAAG,CAAC;YACb,CAAC,EACD,EAAE,CACH,CAAC;YAEF,GAAG,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,aAAa,CAAC,EAAE;gBACzD,eAAe,EAAE,YAAY;aAC9B,CAAC,CAAC;YAEH,IAAA,wBAAa,EAAC,cAAc,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;QACpD,CAAC;KACF,CAAC;AACJ,CAAC;AA/BD,+BA+BC","sourcesContent":["import { readJsonSync, writeJsonSync } from 'fs-extra';\nimport walkSync from 'walk-sync';\nimport type { Plugin } from 'rollup';\n\nexport default function publicAssets(\n path: string,\n opts: { include: string[]; exclude: string[] }\n): Plugin {\n const includeGlobPatterns = opts?.include;\n const excludedGlobPatterns = opts?.exclude || [];\n\n return {\n name: 'public-assets-bundler',\n generateBundle() {\n let pkg = readJsonSync('package.json');\n const filenames = walkSync(path, {\n directories: false,\n globs: includeGlobPatterns,\n ignore: excludedGlobPatterns,\n });\n const publicAssets: Record<string, string> = filenames.reduce(\n (acc: Record<string, string>, v): Record<string, string> => {\n acc[`./${path}/${v}`] = ['/', pkg.name, '/', path, '/', v].join('');\n return acc;\n },\n {}\n );\n\n pkg['ember-addon'] = Object.assign({}, pkg['ember-addon'], {\n 'public-assets': publicAssets,\n });\n\n writeJsonSync('package.json', pkg, { spaces: 2 });\n },\n };\n}\n"]}
|
package/src/rollup.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare class Addon {
|
|
|
10
10
|
}): Plugin;
|
|
11
11
|
publicEntrypoints(patterns: string[]): Plugin;
|
|
12
12
|
hbs(): Plugin;
|
|
13
|
-
clean():
|
|
13
|
+
clean(): Plugin;
|
|
14
14
|
keepAssets(patterns: string[]): Plugin;
|
|
15
15
|
output(): {
|
|
16
16
|
dir: string;
|
|
@@ -20,4 +20,8 @@ export declare class Addon {
|
|
|
20
20
|
sourcemap: boolean;
|
|
21
21
|
};
|
|
22
22
|
dependencies(): Plugin;
|
|
23
|
+
publicAssets(path: string, opts: {
|
|
24
|
+
include: string[];
|
|
25
|
+
exclude: string[];
|
|
26
|
+
}): Plugin;
|
|
23
27
|
}
|
package/src/rollup.js
CHANGED
|
@@ -22,6 +22,7 @@ const rollup_app_reexports_1 = __importDefault(require("./rollup-app-reexports")
|
|
|
22
22
|
const rollup_plugin_delete_1 = __importDefault(require("rollup-plugin-delete"));
|
|
23
23
|
const rollup_keep_assets_1 = __importDefault(require("./rollup-keep-assets"));
|
|
24
24
|
const rollup_addon_dependencies_1 = __importDefault(require("./rollup-addon-dependencies"));
|
|
25
|
+
const rollup_public_assets_1 = __importDefault(require("./rollup-public-assets"));
|
|
25
26
|
class Addon {
|
|
26
27
|
constructor(params = {}) {
|
|
27
28
|
var _a, _b;
|
|
@@ -89,6 +90,9 @@ class Addon {
|
|
|
89
90
|
dependencies() {
|
|
90
91
|
return (0, rollup_addon_dependencies_1.default)();
|
|
91
92
|
}
|
|
93
|
+
publicAssets(path, opts) {
|
|
94
|
+
return (0, rollup_public_assets_1.default)(path, opts);
|
|
95
|
+
}
|
|
92
96
|
}
|
|
93
97
|
exports.Addon = Addon;
|
|
94
98
|
_Addon_srcDir = new WeakMap(), _Addon_destDir = new WeakMap();
|
package/src/rollup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.js","sourceRoot":"","sources":["rollup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4EAAqD;AACrD,4FAA2E;AAC3E,kFAAiE;AACjE,gFAAwD;AACxD,8EAA6D;AAC7D,4FAAsE;
|
|
1
|
+
{"version":3,"file":"rollup.js","sourceRoot":"","sources":["rollup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4EAAqD;AACrD,4FAA2E;AAC3E,kFAAiE;AACjE,gFAAwD;AACxD,8EAA6D;AAC7D,4FAAsE;AACtE,kFAAiE;AAGjE,MAAa,KAAK;IAIhB,YAAY,SAAgD,EAAE;;QAH9D,gCAAgB;QAChB,iCAAiB;QAGf,uBAAA,IAAI,iBAAW,MAAA,MAAM,CAAC,MAAM,mCAAI,KAAK,MAAA,CAAC;QACtC,uBAAA,IAAI,kBAAY,MAAA,MAAM,CAAC,OAAO,mCAAI,MAAM,MAAA,CAAC;IAC3C,CAAC;IAED,0EAA0E;IAC1E,yEAAyE;IACzE,0CAA0C;IAC1C,YAAY,CACV,QAAkB,EAClB,OAAuD,EAAE;QAEzD,OAAO,IAAA,8BAAY,EAAC;YAClB,IAAI,EAAE,uBAAA,IAAI,qBAAQ;YAClB,EAAE,EAAE,uBAAA,IAAI,sBAAS;YACjB,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC,CAAC;IACL,CAAC;IAED,4EAA4E;IAC5E,0EAA0E;IAC1E,+EAA+E;IAC/E,iBAAiB,CAAC,QAAkB;QAClC,OAAO,IAAA,mCAAiB,EAAC,EAAE,MAAM,EAAE,uBAAA,IAAI,qBAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,oEAAoE;IACpE,sEAAsE;IACtE,8DAA8D;IAC9D,GAAG;QACD,OAAO,IAAA,2BAAG,GAAE,CAAC;IACf,CAAC;IAED,6EAA6E;IAC7E,aAAa;IACb,KAAK;QACH,OAAO,IAAA,8BAAK,EAAC,EAAE,OAAO,EAAE,GAAG,uBAAA,IAAI,sBAAS,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,4EAA4E;IAC5E,6EAA6E;IAC7E,6EAA6E;IAC7E,UAAU;IACV,UAAU,CAAC,QAAkB;QAC3B,OAAO,IAAA,4BAAU,EAAC;YAChB,IAAI,EAAE,uBAAA,IAAI,qBAAQ;YAClB,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;IACL,CAAC;IAED,8EAA8E;IAC9E,2EAA2E;IAC3E,4EAA4E;IAC5E,UAAU;IACV,EAAE;IACF,wFAAwF;IACxF,qDAAqD;IACrD,qFAAqF;IACrF,sBAAsB;IACtB,MAAM;QACJ,OAAO;YACL,GAAG,EAAE,uBAAA,IAAI,sBAAS;YAClB,MAAM,EAAE,IAAI;YACZ,cAAc,EAAE,QAAQ;YACxB,sBAAsB,EAAE,KAAK;YAC7B,SAAS,EAAE,IAAI;SAChB,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAA,mCAAY,GAAE,CAAC;IACxB,CAAC;IAED,YAAY,CAAC,IAAY,EAAE,IAA8C;QACvE,OAAO,IAAA,8BAAY,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AAjFD,sBAiFC","sourcesContent":["import { default as hbs } from './rollup-hbs-plugin';\nimport { default as publicEntrypoints } from './rollup-public-entrypoints';\nimport { default as appReexports } from './rollup-app-reexports';\nimport { default as clean } from 'rollup-plugin-delete';\nimport { default as keepAssets } from './rollup-keep-assets';\nimport { default as dependencies } from './rollup-addon-dependencies';\nimport { default as publicAssets } from './rollup-public-assets';\nimport type { Plugin } from 'rollup';\n\nexport class Addon {\n #srcDir: string;\n #destDir: string;\n\n constructor(params: { srcDir?: string; destDir?: string } = {}) {\n this.#srcDir = params.srcDir ?? 'src';\n this.#destDir = params.destDir ?? 'dist';\n }\n\n // Given a list of globs describing modules in your srcDir, this generates\n // corresponding appTree modules that contain reexports, and updates your\n // package.json metadata to list them all.\n appReexports(\n patterns: string[],\n opts: { mapFilename?: (fileName: string) => string } = {}\n ): Plugin {\n return appReexports({\n from: this.#srcDir,\n to: this.#destDir,\n include: patterns,\n mapFilename: opts.mapFilename,\n });\n }\n\n // This configures rollup to emit public entrypoints for each module in your\n // srcDir that matches one of the given globs. Typical addons will want to\n // match patterns like \"components/**/*.js\", \"index.js\", and \"test-support.js\".\n publicEntrypoints(patterns: string[]) {\n return publicEntrypoints({ srcDir: this.#srcDir, include: patterns });\n }\n\n // This wraps standalone .hbs files as Javascript files using inline\n // templates. This means special resolving rules for .hbs files aren't\n // required for javascript tooling to understand your package.\n hbs() {\n return hbs();\n }\n\n // By default rollup does not clear the output directory between builds. This\n // does that.\n clean() {\n return clean({ targets: `${this.#destDir}/*`, hook: 'generateBundle' });\n }\n\n // V2 Addons are allowed to contain imports of .css files. This tells rollup\n // to leave those imports alone and to make sure the corresponding .css files\n // are kept in the same relative locations in the destDir as they were in the\n // srcDir.\n keepAssets(patterns: string[]) {\n return keepAssets({\n from: this.#srcDir,\n include: patterns,\n });\n }\n\n // This is the default `output` configuration you should pass to rollup. We're\n // emitting ES modules, in your `destDir`, and their filenames are equal to\n // their bundle names (the bundle names get generated by `publicEntrypoints`\n // above).\n //\n // hoistTransitiveImports is disabled because the purpose of hoisting transitive imports\n // is to improve performance of apps loading modules.\n // Since v2 addons do not know exactly how they'll be used, this performance decision\n // is left up to apps.\n output() {\n return {\n dir: this.#destDir,\n format: 'es',\n entryFileNames: '[name]',\n hoistTransitiveImports: false,\n sourcemap: true,\n };\n }\n\n dependencies() {\n return dependencies();\n }\n\n publicAssets(path: string, opts: { include: string[]; exclude: string[] }) {\n return publicAssets(path, opts);\n }\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare type TemplateTransform = () => {
|
|
2
|
-
name: string;
|
|
3
|
-
visitor: {};
|
|
4
|
-
};
|
|
5
|
-
export declare type TemplateTransformPlugin = TemplateTransform | string;
|
|
6
|
-
export interface Options {
|
|
7
|
-
astTransforms?: TemplateTransformPlugin[];
|
|
8
|
-
compilerPath?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: {
|
|
11
|
-
(babel: typeof import("@babel/core")): unknown;
|
|
12
|
-
_parallelBabel: {
|
|
13
|
-
requireFile: string;
|
|
14
|
-
};
|
|
15
|
-
baseDir(): string;
|
|
16
|
-
};
|
|
17
|
-
export default _default;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const babel_plugin_stage1_inline_hbs_1 = __importDefault(require("@embroider/core/src/babel-plugin-stage1-inline-hbs"));
|
|
7
|
-
const core_1 = require("@embroider/core");
|
|
8
|
-
const load_ember_template_compiler_1 = require("@embroider/core/src/load-ember-template-compiler");
|
|
9
|
-
function resolvePlugins(plugins) {
|
|
10
|
-
return plugins.map((somePlugin) => {
|
|
11
|
-
// If it's a string attempt to resolve the path to a module.
|
|
12
|
-
return typeof somePlugin === 'string'
|
|
13
|
-
? require(require.resolve(somePlugin, { paths: [process.cwd()] })) // eslint-disable-line @typescript-eslint/no-require-imports
|
|
14
|
-
: somePlugin;
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
exports.default = (0, babel_plugin_stage1_inline_hbs_1.default)((options) => {
|
|
18
|
-
let { astTransforms: somePlugins = [], compilerPath = 'ember-source/dist/ember-template-compiler', } = options;
|
|
19
|
-
compilerPath = require.resolve(compilerPath);
|
|
20
|
-
const astTransforms = resolvePlugins(somePlugins);
|
|
21
|
-
const params = {
|
|
22
|
-
EmberENV: {},
|
|
23
|
-
loadEmberTemplateCompiler: () => (0, load_ember_template_compiler_1.getEmberExports)(compilerPath),
|
|
24
|
-
plugins: {
|
|
25
|
-
ast: astTransforms,
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
return new core_1.TemplateCompiler(params);
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=template-transform-plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-transform-plugin.js","sourceRoot":"","sources":["template-transform-plugin.ts"],"names":[],"mappings":";;;;;AAAA,wHAAsE;AACtE,0CAA2E;AAC3E,mGAAmF;AAWnF,SAAS,cAAc,CAAC,OAAkC;IACxD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,UAAmC,EAAE,EAAE;QACzD,4DAA4D;QAC5D,OAAO,OAAO,UAAU,KAAK,QAAQ;YACnC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,4DAA4D;YAC/H,CAAC,CAAC,UAAU,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,kBAAe,IAAA,wCAAI,EAAC,CAAC,OAAgB,EAAE,EAAE;IACvC,IAAI,EACF,aAAa,EAAE,WAAW,GAAG,EAAE,EAC/B,YAAY,GAAG,2CAA2C,GAC3D,GAAG,OAAO,CAAC;IAEZ,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAE7C,MAAM,aAAa,GAAwB,cAAc,CAAC,WAAW,CAAC,CAAC;IAEvE,MAAM,MAAM,GAA2B;QACrC,QAAQ,EAAE,EAAE;QACZ,yBAAyB,EAAE,GAAG,EAAE,CAAC,IAAA,8CAAe,EAAC,YAAY,CAAC;QAC9D,OAAO,EAAE;YACP,GAAG,EAAE,aAAa;SACnB;KACF,CAAC;IAEF,OAAO,IAAI,uBAAgB,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC,CAAC,CAAC","sourcesContent":["import make from '@embroider/core/src/babel-plugin-stage1-inline-hbs';\nimport { TemplateCompiler, TemplateCompilerParams } from '@embroider/core';\nimport { getEmberExports } from '@embroider/core/src/load-ember-template-compiler';\n\nexport type TemplateTransform = () => { name: string; visitor: {} };\nexport type TemplateTransformPlugin = TemplateTransform | string;\nexport interface Options {\n // An array of either Glimmer AST plugins or paths that can be resolved to a plugin.\n astTransforms?: TemplateTransformPlugin[];\n // Defaults to 'ember-source/dist/ember-template-compiler'\n compilerPath?: string;\n}\n\nfunction resolvePlugins(plugins: TemplateTransformPlugin[]) {\n return plugins.map((somePlugin: TemplateTransformPlugin) => {\n // If it's a string attempt to resolve the path to a module.\n return typeof somePlugin === 'string'\n ? require(require.resolve(somePlugin, { paths: [process.cwd()] })) // eslint-disable-line @typescript-eslint/no-require-imports\n : somePlugin;\n });\n}\n\nexport default make((options: Options) => {\n let {\n astTransforms: somePlugins = [],\n compilerPath = 'ember-source/dist/ember-template-compiler',\n } = options;\n\n compilerPath = require.resolve(compilerPath);\n\n const astTransforms: TemplateTransform[] = resolvePlugins(somePlugins);\n\n const params: TemplateCompilerParams = {\n EmberENV: {},\n loadEmberTemplateCompiler: () => getEmberExports(compilerPath),\n plugins: {\n ast: astTransforms,\n },\n };\n\n return new TemplateCompiler(params);\n});\n"]}
|