The future is React without React.
Node.js v8 or newer is required.
Via the yarn client:
$ yarn add --dev unreact
Via the npm client:
$ npm install --save-dev unreact
--out-file
/-o
)unreact src/button.js --out-file views/button.pug
--out-dir
/-O
)unreact src --out-dir views
--template-engine
/-t
)Default option is pug
, you can also choose ejs
.
unreact src/button.js --out-file views/button.ejs --template-engine ejs
unreact src --out-dir views -t ejs
--add-beginning
)unreact src/main.js --out-file views/main.pug --add-beginning "include header.pug"
--add-ending
)unreact src/main.js --out-file views/main.pug --add-ending "include footer.pug"
--initial-indent-level
)unreact src/main.js --out-file views/main.pug --initial-indent-level 1
ALPHA: things may not work
Check the work bridging React and Prepack:
Feel free to dive in! Open an issue or submit PRs.
unreact follows the Contributor Covenant Code of Conduct.