Skip to content

A codemod for migrating off of coffee-react CJSX

Notifications You must be signed in to change notification settings

jsdf/cjsx-codemod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cjsx-codemod

A codemod for migrating off coffee-react CJSX

Usage

Install 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

About

A codemod for migrating off of coffee-react CJSX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published