An open API service indexing awesome lists of open source software.

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

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"}'
```