0.1.2 • Published 2 years ago

jasat v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

NameOPTIONS
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

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago