wix-incubator / react-templates

Light weight templates for react
https://wix.github.io/react-templates
MIT License
2.82k stars 207 forks source link

API For RT #213

Closed jmc420 closed 7 years ago

jmc420 commented 7 years ago

Hi

Is there an API which allows you to run the rt compiler within a program (either in nodejs or in a browser); I guess in nodejs one could fork a task but as I guess the playground runs within a browser environment?

James

nippur72 commented 7 years ago

there is no formal API, but you can require and use the javascript modules from node_modules/react-templates. I do that in my (still unfinished) rioct-cli project, see for example rtExtractor.ts.

jmc420 commented 7 years ago

thanks for that and pointing me at your project; I work in typescript so it will be very useful.