Skip to content

Reduce manual work. Use a codemod. 1. Extract text strings from react components, 2. Find states that should be colocated (coming soon)

Notifications You must be signed in to change notification settings

xerosanyam/codemod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • wrong output? please remove any babel.config.js files temporarily & re-try to avoid any parsing problems.

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

About

Reduce manual work. Use a codemod. 1. Extract text strings from react components, 2. Find states that should be colocated (coming soon)

Topics

Resources

Stars

Watchers

Forks