jade-to-jsx
A very hacky converter for jade files to react components.
Handles very basic variables in jade, e.g. p= foo
by converting to props as appropriate, but currently trips over a lot of cases.
Install
npm install -g jade-to-jsxjade-to-jsx test.jade > Test.js
Example
jade-to-jsx test.jade > Test.js
Will convert:
h1 Hellop= foop= foo*2p= bar.baz include ./bar.jade
; ;
Replacing includes
You can replace includes with components like so:
jade-to-jsx test.jade -r ./bar.jade -w ./Bar > Test.js
-r
path to actually included jade file-w
path that should be imported in the react component file
results in:
;; ;
Contributing
Umm, sorry about the code? Very messy hack rn.
License
MIT