@twilio-paste/codemods v0.8.0
@twilio-paste/codemods
This repository contains a collection of codemod scripts for use with JSCodeshift that help update projects built with Paste.
This project mimics the wonderful react-codemods project.
Usage
npx @twilio-paste/codemods <transform> <path> [...options]
transform
- name of transform, see available transforms below.path
- files or directory to transform- use the
--dry
option for a dry-run and use--print
to print the output for comparison
This will start an interactive wizard, and then run the specified transform.
Included Transforms
barreled-to-unbarreled
Converts old-style core imports to the new unbarreled style. import {Button} from '@twilio-paste/core'
becomes import {Button} from '@twilio-paste/core/button'
npx @twilio-paste/codemods barreled-to-unbarreled <path>
Usage
npx react-codemod class <path>
jscodeshift options
To pass more options directly to jscodeshift, use --jscodeshift="..."
. For example:
npx react-codemod --jscodeshift="--run-in-band --verbose=2"
See all available options here.
Recast Options
Options to recast's printer can be provided
through jscodeshift's printOptions
command line argument
npx @twilio-paste/codemods <transform> <path> --jscodeshift="--printOptions='{\"quote\":\"double\"}'"
1 month ago
3 months ago
10 months ago
10 months ago
9 months ago
10 months ago
7 months ago
8 months ago
8 months ago
6 months ago
7 months ago
12 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago