Skip to content

Commit

Permalink
fix(classes): fixed transformer ttypescript / ts-patch support (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
nonara authored Jan 22, 2024
1 parent ec00a0d commit eafd79b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/classes/transformer-plugin/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ export default {
};
```

### ttypescript
### ts-patch

ttypescript patches typescript in order to use transformers in tsconfig.json. See [ttypescript's README](https://github.com/cevek/ttypescript) for how to use this with module bundlers such as webpack or Rollup.
ts-patch patches typescript in order to use transformers in tsconfig.json. See [ts-patch's README](https://github.com/nonara/ts-patch) for how to use this with module bundlers such as webpack or Rollup.

```
{
Expand All @@ -210,6 +210,7 @@ ttypescript patches typescript in order to use transformers in tsconfig.json. Se
"plugins": [
{
"transform": "@automapper/classes/transformer-plugin",
"import": "tspBefore",
"modelFileNameSuffix": [...]
}
],
Expand Down
5 changes: 5 additions & 0 deletions packages/classes/transformer-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,10 @@ export const before = (
program: Program
) => automapperTransformerPlugin(program, options).before;

export const tspBefore = (
program: Program,
options: AutomapperTransformerPluginOptions
) => automapperTransformerPlugin(program, options).before;

export * from './lib/options';
export * from './lib/constants';

0 comments on commit eafd79b

Please sign in to comment.