This repository contains a collection of codemod scripts for use with JSCodeshift.
npm install -g jscodeshift
git clone https://github.com/gilbarbara/js-codemod.git
jscodeshift -t <codemod-script> <file>
Use the -d
option for a dry-run and use -p
to print the output for
comparison.
jscodeshift -t js-codemod/transforms/epic-to-saga.js <file>
Options to recast's printer can be provided
through the printOptions
command line argument
jscodeshift -t transform.js <file> --printOptions='{"quote":"double"}'