xerosanyam / codemod

Reduce manual work. Use a codemod. 1. Extract text strings from react components, 2. Find states that should be colocated (coming soon)
2 stars 0 forks source link
codemod i18n jscodeshift react

Codemod 🪄

Things the library can do

  1. Extract strings from react components (required during i18n and testing)
  2. Find states that can be colocated inside components (improves performance) (Coming Soon!)

Usage - Interactive

npx github:xerosanyam/codemod

Usage - Advanced

npx github:xerosanyam/codemod <file or dir to apply on> <transformer name>
npx github:xerosanyam/codemod fixtures extract-strings

Transformers List

  1. extract-strings
  2. ...

Debugging


Inspirations

Development

  1. Using inquirer node index.mjs --force

  2. Specific transformer node index.mjs extract-strings fixtures/ --force

  3. Run on folder jscodeshift --verbose=2 --extensions=tsx,ts,jsx,js --transform /Users/sanyamjain/dev/xerosanyam/codemod/transformer/extract-strings.js fixtures