Skip to content

Instantly share code, notes, and snippets.

@ian-bartholomew
Last active August 2, 2017 18:46
Show Gist options
  • Save ian-bartholomew/0291cafc36e3ce6a48e3c276297978e8 to your computer and use it in GitHub Desktop.
Save ian-bartholomew/0291cafc36e3ce6a48e3c276297978e8 to your computer and use it in GitHub Desktop.
CJSX -> JSX/ES6

Dependencies

Depercolator

React codemon

Usage

To transpile cjsx to jsx: depercolate --prefer-const <filename>

To then update the jsx to the newest React API (info): jscodeshift -t ./transforms/class.js --mixin-module-name=react-addons-pure-render-mixin --flow=true --pure-component=true --remove-runtime-proptypes=false <path>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment