dougmoscrop / angularjs-templates-brunch

Compile templates in to an AngularJS module as a Brunch plugin
MIT License
5 stars 8 forks source link

More robust string escaping and add a path transformation option #4

Closed wiltzius closed 9 years ago

wiltzius commented 9 years ago
  1. Use js-string-escape instead of regex to escape template strings before including in the output file.
  2. Add an option to specify a callback function that will transform paths from source location to served location.

What do you think?

dougmoscrop commented 9 years ago

Did you accidentally overwrite the @base config part?

wiltzius commented 9 years ago

I tried using the @base config, but found it too inflexible so I replaced it with the transform function. I could certainly add back the base as an additional config parameter if you like.

dougmoscrop commented 9 years ago

Oh, I gotcha, yeah that makes sense.

I think just that stray parseHtml function can go away now that you're not using it, then it's all good to me.

wiltzius commented 9 years ago

Finally had a chance to update; sorry for the long silence. Removed that extraneous parseHtml function. Let me know if there are any other changes you think it needs, or merge if you like.