Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r17x/jasat
Codemod for JavaScript Stuff (Jasat is shortname)
https://github.com/r17x/jasat
ast codemod javascript transform typescript
Last synced: about 3 hours ago
JSON representation
Codemod for JavaScript Stuff (Jasat is shortname)
- Host: GitHub
- URL: https://github.com/r17x/jasat
- Owner: r17x
- Created: 2022-01-27T17:05:21.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-11T08:54:23.000Z (almost 3 years ago)
- Last Synced: 2024-11-20T06:51:45.239Z (23 days ago)
- Topics: ast, codemod, javascript, transform, typescript
- Language: JavaScript
- Homepage:
- Size: 1.34 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-made-by-indonesian - jasat - `Codemod for JavaScript Stuff (Jasat is shortname)` *by [RiN](https://github.com/ri7nz)* (J)
README
Tools for code moderation, transformation, or use for maintain JavaScript stuff related.
Use case •
Usage •
Special Thanks •
Alternative •
Contribution •
License## Use case
- find and replace some code.
- remove some code (like `console.log`).## Usage
### Using with `npx`
```console
npx jasat [OPTIONS]
```
### Using as development dependencies
#### add in `devDependencies`
```console
yarn add -D jasat
```
#### run
```console
yarn jasat [OPTIONS]
```
### Transforms
| Name | OPTIONS |
| ----------------------- | ----------- |
| `import-source-replace` | "FROM" "TO" |
| `remove-console` | - |### Command OPTIONS
```console
Tools for code moderation, transformation, or use for maintain JavaScript stuff related.
USAGE
npx jasat <...OPTIONS>OPTIONS
--write, -w Allow to modified target file.
--cwd, -C Set current working directory (default: `process.cwd()`).
--help, -h Print help.
--list, -l Print list of TRANSFORM.
--version, -v Print version.```
### Example
```console
npx jasat import-source-replace "react" "preact" // dry-run
npx jasat import-source-replace "react" "preact" --write // write to system or target files```
## Special Thanks
- [**equivalent-exchange**](https://github.com/suchipi/equivalent-exchange) - Transmute one JavaScript string into another by way of mutating its AST. Powered by babel and recast.
## Alternative
- [**jscodeshift**](https://github.com/facebook/jscodeshift) - A JavaScript codemod toolkit.
- [**comby**](https://github.com/comby-tools/comby) - A tool for structural code search and replace that supports ~every language.## Contribution
### Making pull requests
- Use [**conventional-commits**](https://www.conventionalcommits.org/en/v1.0.0/) before make a pull request.
## License
**MIT**