react-router-v4-codemods
v0.1.1
Published
![Build and Deploy](https://github.com/rajasegar/react-router-v4-codemods/workflows/CI/badge.svg) [![npm version](http://img.shields.io/npm/v/react-router-v4-codemods.svg?style=flat)](https://npmjs.org/package/react-router-v4-codemods 'View this project o
Downloads
4
Maintainers
Readme
react-router-v4-codemods
A collection of codemods for migrating to react-router v4.
Usage
To run a specific codemod from this project, you would run the following:
npx react-router-v4-codemods <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
# or
yarn global add react-router-v4-codemods
react-router-v4-codemods <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
Local Usage
node ./bin/cli.js <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
Transforms
- add-exact-prop
- create-hash-history
- hash-router
- index-route
- remove-with-props
- rename-imports
- wrap-with-switch
Contributing
Installation
- clone the repo
- change into the repo directory
yarn
Running tests
yarn test
Update Documentation
yarn update-docs