Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajasegar/react-router-v4-codemods
Codemods for migrating react-router to v4
https://github.com/rajasegar/react-router-v4-codemods
codemod codemods react react-router
Last synced: 11 days ago
JSON representation
Codemods for migrating react-router to v4
- Host: GitHub
- URL: https://github.com/rajasegar/react-router-v4-codemods
- Owner: rajasegar
- License: mit
- Created: 2023-01-07T17:06:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-08T06:32:36.000Z (almost 2 years ago)
- Last Synced: 2024-11-16T01:41:40.472Z (about 1 month ago)
- Topics: codemod, codemods, react, react-router
- Language: JavaScript
- Homepage:
- Size: 217 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-codemods - react-router-v4-codemods - Codemods for migrating react-router from v3 to v4. (Libraries / react-router)
README
# react-router-v4-codemods
![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 on npm')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 path/of/files/ or/some**/*glob.js# or
yarn global add react-router-v4-codemods
react-router-v4-codemods path/of/files/ or/some**/*glob.js
```## Local Usage
```
node ./bin/cli.js path/of/files/ or/some**/*glob.js
```## Transforms
* [add-exact-prop](transforms/add-exact-prop/README.md)
* [create-hash-history](transforms/create-hash-history/README.md)
* [hash-router](transforms/hash-router/README.md)
* [index-route](transforms/index-route/README.md)
* [remove-with-props](transforms/remove-with-props/README.md)
* [rename-imports](transforms/rename-imports/README.md)
* [wrap-with-switch](transforms/wrap-with-switch/README.md)## Contributing
### Installation
* clone the repo
* change into the repo directory
* `yarn`### Running tests
* `yarn test`
### Update Documentation
* `yarn update-docs`