Simple extension to laravel elixir that concatenates and registers AngularJS templates in the $templateCache
.
npm install --save laravel-elixir-ng-templates
var elixir = require("laravel-elixir");
require("laravel-elixir-ng-templates");
elixir(function(mix) {
mix.ngTemplates();
});
source
:gulp.src()
resources/assets/templates/**/*.html
output
:resources/assets/js/templates.js
options
:gulp-angular-templatecache
elixir(function(mix) {
mix.ngTemplates('some/other/dir/**/*.html', 'public/assets', {
filename: 'angular-tpls.js',
root: 'tpls/',
module: 'tpls'
});
});