eddyson-de / tapestry-react

Integration of Apache Tapestry and React
Apache License 2.0
17 stars 5 forks source link

Provide a way to pre-compile resources during compile time #66

Open jochenberger opened 7 years ago

jochenberger commented 7 years ago

To speed things up in production, it is often desirable to to the transformation step during compile time. In some of my projects, I use the Gradle Node Plugin (https://github.com/srs/gradle-node-plugin) and add a custom task that transforms the files and packages the results inside the jar/war task. I'd like this library to provide some utility code to perform the transformation from outside of a Tapestry webapp.

jochenberger commented 7 years ago

Using the Reader or standalone compiler classes is not really an option if you have a large number of files. The compiler implementations are just too slow in single-file mode. Maybe they can be changed to compile multiple files at once, maybe that'll be faster.

jochenberger commented 7 years ago

See https://gist.github.com/jochenberger/9c61fbbb1db5d935ee35ed65e15ba1aa. We'll probably want to make that into a Gradle plugin.