a-transform-transformer v1.2.1
A-transformer-transformer
The a-transformer-transformer is a tool that allows you to migrate your Angular @Input()which are of type
boolean or number to use the new transform property with the booleanAttribute or the numberAttribute
transformer.
If you have @Input with existing decorator arguments for example (@Input({required: true})) the tool will merge them
with the transform: booleanAttribute.
Installation
The package can either be installed locally inside your project as a dev dependency or globally. Since its a one time
migration tool we think its best used with npx though.
Local
npm i -D a-transformer-transformerGlobal
npm i -g a-transformer-transformernpx
npx a-transformer-transformerUsage
To use the transformer just execute one of the following commands inside the root of your project.
Transform boolean
The transformer currently offers the option to add {transform: booleanAttribute} to your @Input() of type boolean. To do so you have to run the following command.
npx a-transformer-transformer -bTransform numbers
The transformer currently offers the option to add {transform: numberAttribute} to your @Input() of type number. To do so you have to run the following command.
npx a-transformer-transformer -nTransform all
To apply all available transformations you can run the following command.
npx a-transformer-transformer -aHelp
To get a list of all the available options you can always run the following command.
npx a-transformer-transformer -hContributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!