Skip to content

Commit

Permalink
document new option to tempalte tag codemod
Browse files Browse the repository at this point in the history
  • Loading branch information
void-mAlex committed Oct 8, 2024
1 parent 8850c96 commit 52a00d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
```
Expand All @@ -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
Expand Down

0 comments on commit 52a00d1

Please sign in to comment.