This repository contains a collection of codemod scripts based for use with JSCodeshift that helps with Gridiron Migration
npm install -g jscodeshift
jscodeshift -t <codemod-script> <file>
- Use the
-d
option for a dry-run and use-p
to print the output for comparison
convert-ad
,convert-helmet-import
,remove-gridiron-import
,convert-prefetch
- import helpersconvert-to-radium
,remove-stilr
- convert from stilr to radiumresolve-relative-imports
- Convert to JSPM Imports
Options to recast's printer can be provided
through the printOptions
command line argument
jscodeshift -t transform.js <file> --printOptions='{"quote":"double"}'
This repo is based off of reactjs-codemod. Thank you @reactjs and @fbOpenSource!