Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opensly/sly-altercode
Altercode is a node based CLI toolkit to assist you with code shift.
https://github.com/opensly/sly-altercode
codeshift jscodeshift
Last synced: 9 days ago
JSON representation
Altercode is a node based CLI toolkit to assist you with code shift.
- Host: GitHub
- URL: https://github.com/opensly/sly-altercode
- Owner: opensly
- License: mit
- Created: 2024-05-17T03:26:07.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-09T02:42:41.000Z (about 1 month ago)
- Last Synced: 2024-11-09T03:28:28.516Z (about 1 month ago)
- Topics: codeshift, jscodeshift
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Altercode
Altercode is a simple node based CLI tool/library to assist you with large-scale code shift that can be partially automated but still require human oversight and occasional intervention. Altercode is completely open source and free to use.
## Usage
Install the package as a with the below command
```
npm i sly-altercode --save-dev
```Create a config file named `altercode.config.json` at the root level of your repository.
```
{
"sourceDir": "./src/app",
"excludeExtns": [".test.ts", ".enum.ts", ".constants.ts", ...]
"mutations": [
{
"searchString": "page-wrapper",
"replaceWith": "page-container"
},
{
"searchString": "...",
"replaceWith": "..."
},
...
]
}
```Add the below command in the scripts of your package.json
```
"scripts": {
"assist": "altercode --config altercode.config.json"
}
```You're all set. Now run the assist command to process your code shift tasks
```
npm run assist
```
## License
This project is licensed under the MIT license. See the LICENSE file for more info.