0.8.0 • Published 1 month ago

@twilio-paste/codemods v0.8.0

Weekly downloads
23
License
MIT
Repository
-
Last release
1 month ago

@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\"}'"
0.8.0

1 month ago

0.7.0

3 months ago

0.3.6

10 months ago

0.3.5

10 months ago

0.3.8

9 months ago

0.3.7

10 months ago

0.5.0

7 months ago

0.4.1

8 months ago

0.4.0

8 months ago

0.6.1

6 months ago

0.6.0

7 months ago

0.3.4

12 months ago

0.3.3

1 year ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.9

2 years ago

0.2.8

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.25-beta.12

3 years ago

0.1.23

3 years ago

0.1.24

3 years ago

0.1.22

3 years ago

0.1.20

3 years ago

0.1.21

3 years ago

0.1.19

3 years ago

0.1.18

3 years ago

0.1.16

3 years ago

0.1.17

3 years ago

0.1.15

3 years ago

0.1.15-beta.5

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.8

3 years ago

0.1.9

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.0

3 years ago

0.0.2-beta.1515

3 years ago

0.1.1

3 years ago

0.0.2-beta.1497

3 years ago