npm install -g [email protected]
jscodeshift -t codemods/templateCacheToWebpackImport.js src/
See https://github.com/cpojer/js-codemod
normal mode
jscodeshift -d -t codemods/templateCacheToWebpackImport.js path/to/js
debug mode
node --debug-brk --inspect `which jscodeshift` --run-in-band -p -d -t codemods/templateCacheToWebpackImport.js codemods/test.js
Thanks for this! Works great! Only catch is it doesn't work with template literals.
Line 65 fails
.find(j.Literal)
.