A codemod for migrating off coffee-react CJSX
UsageInstall it:
npm install -g cjsx-codemod
Print command line options:
cjsx-codemod
Run the codemod on a directory tree of CJSX code:
cjsx-codemod ./my-app
Convert to using some custom DSL instead of React.createElement
:
cjsx-codemod --jsx-import='myDSL = require "my-dsl"' --jsx-expression='`myDSL(${ELEMENT}, ${ARGS})`' ./my-app
Convert to using teact:
cjsx-codemod --jsx-import='{crel} = require "teact"' --jsx-expression='`crel(${ELEMENT}, ${ARGS})`' ./my-app
Based on jscodeshift
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4