miickel/gulp-angular-templatecache — pull request #14 by dejanr (2014-03-26 12:16:36+00:00)
Title: Add option to create standalone node module.

For people using angular with browserify, adding this feature is
crucial so they could embed easily template caches in their build.

> templateCache('templates_cache.js', {
> standaloneModule: true
> });

So end result is valid node module, which could be used inside browserify app.

> module.exports = angular.module("templates", []).run(["$templateCache", function($templateCache) {}]);

Here is a example app:

> require('angular');
>
> var app = angular.module('app', [
> require('./templates_cache').name
> ]);
>
> app.config(require('./routes'));