https://github.com/gilbarbara/js-codemod
Codemod scripts to transform code
https://github.com/gilbarbara/js-codemod
Last synced: 10 months ago
JSON representation
Codemod scripts to transform code
- Host: GitHub
- URL: https://github.com/gilbarbara/js-codemod
- Owner: gilbarbara
- Created: 2017-12-17T04:46:42.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-17T04:46:46.000Z (about 8 years ago)
- Last Synced: 2025-03-15T03:48:11.791Z (10 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## js-codemod
This repository contains a collection of codemod scripts for use with
[JSCodeshift](https://github.com/facebook/jscodeshift).
### Setup & Run
```sh
npm install -g jscodeshift
git clone https://github.com/gilbarbara/js-codemod.git
jscodeshift -t
```
Use the `-d` option for a dry-run and use `-p` to print the output for
comparison.
### Included Scripts
#### `epic-to-saga`
```sh
jscodeshift -t js-codemod/transforms/epic-to-saga.js
```
### Recast Options
[Options to recast's printer](https://github.com/benjamn/recast/blob/master/lib/options.js) can be provided
through the `printOptions` command line argument
```sh
jscodeshift -t transform.js --printOptions='{"quote":"double"}'
```