jasat
v0.1.2
Published
Tools for code moderation, transformation, or use for maintain JavaScript stuff related.
Downloads
7
Readme
Use case
- find and replace some code.
- remove some code (like
console.log
).
Usage
Using with npx
npx jasat <TRANSFORM> [OPTIONS]
Using as development dependencies
add in devDependencies
yarn add -D jasat
run
yarn jasat <TRANSFORM> [OPTIONS]
Transforms
| Name | OPTIONS |
| ----------------------- | ----------- |
| import-source-replace
| "FROM" "TO" |
| remove-console
| - |
Command OPTIONS
Tools for code moderation, transformation, or use for maintain JavaScript stuff related.
USAGE
npx jasat <TRANSFORM> <...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
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 - Transmute one JavaScript string into another by way of mutating its AST. Powered by babel and recast.
Alternative
- jscodeshift - A JavaScript codemod toolkit.
- comby - A tool for structural code search and replace that supports ~every language.
Contribution
Making pull requests
- Use conventional-commits before make a pull request.
License
MIT