Recipes: gzip and inline angularjs templates

Hi,

I'm using Pho in an ongoing project and had to create the aforementioned tasks. I was thinking that it might be of someone's else interest. I'm not sure if those are the best way to achieve it (specially the angularjs one), but I guess this would be a nice starting point for finding better solutions.

Please let me know what do you think.
Thanks


The plugin I'm using to generate the template cache (gulp-angular-templatecache) generates a .js with the format below. It could be referenced on the page without any issues, but since we are building a single page app, I instead chose to embedded it on the page itself and avoid one more request. As you can see,  the script itself is not minified, although the html template is ($templateCache could receive a shorter name like t, there are new lines, etc):

```js
angular.module("MY_MODULE").run(["$templateCache", function($templateCache) {
$templateCache.put("/template-name-1","<p>content</p>");
$templateCache.put("/template-name-n","<p>content</p>");
});
```

I didn't find an easy way to minify it and for the sake of keeping it simple for now I'm replacing the new lines by hand... It wouldn't change much though to leave them there, though, but it gives me a bit of peace of mind :D


About replacing the </script> tag: let's just say that it breaks browsers if you inline that on the page :P. I don't have an official reference, but it happens with Chrome, for instance. There are quite a few discussions about this in StackOverflow:
* http://stackoverflow.com/questions/236073/why-split-the-script-tag-when-writing-it-with-document-write
* http://stackoverflow.com/questions/8749001/escaping-html-entities-in-javascript-string-literals-within-the-script-block
* http://stackoverflow.com/questions/12331531/inline-javascript-with-script-string-closes-script-tag-by-mistake