gradle-js-plugin
gradle-js-plugin copied to clipboard
html2js functionality
Was about to go write my own plugin to do this, but I reckon it could be a good fit for this plugin, as people wanting to use it are probably using this plugin anyway.
The grunt-html2js plugin at https://github.com/karlgoldstein/grunt-html2js gets used to emit javascript which wraps angularjs html templates in such a way as to allow wrapping them up into a javascript bundle along with the rest of your app. It's pretty common to use it if you're using grunt and angular.
We're using angular here but for several reasons want to use java-based tooling, so we need the capability in gradle in one way or another.
If you're interested in having it added to this plugin, let me know and I'll submit a pull request.
Cheers
Used it, like it, thank you @tomdcc. Want a hand to document usage in the README?
btw, I don't much like how the HTML templates are added to the javascript source set in the functional test, but that wasn't a requirement to use the task, so all good.
Hi tclift! Glad you liked it.
Oh yeah, I realised ages afterwards that I hadn't updated the readme, and submitting another PR to fix that has been on my list of things to do since forever. If you've got the time to do it, please go ahead.
If you have any bugs in the actual generation, raise an issue at tomdcc/html2js-jvm.
Thanks for the feedback!