From 52a00d1cdd553de8497156a65a6b209f9336f0e9 Mon Sep 17 00:00:00 2001 From: void_malex Date: Tue, 8 Oct 2024 15:12:22 +0100 Subject: [PATCH] document new option to tempalte tag codemod --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index eb8a1c114..a3f404a64 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,10 @@ Edit `ember-cli-build.js`: ```js return require('@embroider/compat').templateTagCodemod(app, { shouldTransformPath: (path) => { return true; }, + nameHint: (path) => { + // example path: shared/my-button + return path; + }, dryRun: true, }); ``` @@ -132,6 +136,7 @@ Requires optimized build (static* flags to be turned on) ### Options * `shouldTransformPath` - allows users to filter the templates that the code mod would run on +* `nameHint` - optional function control the import name and template replacement values - valid JS identifier required or it will be coerced into one * `dryRun` - option can be used to obtain a summary of the changed the build would perform and which files it would act upon ### Limitations