npm.io
0.1.2 • Published 4 years agoCLI

jasat

Licence
MIT
Version
0.1.2
Deps
3
Size
8 kB
Vulns
0
Weekly
0
Stars
4

jasat overview Tools for code moderation, transformation, or use for maintain JavaScript stuff related.

CI Release status NPM jasat version

Use caseUsageSpecial ThanksAlternativeContributionLicense

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

License

MIT