laravel-elixir-ng-templates

0.1.3 • Public • Published

laravel-elixir-ng-templates

Simple extension to laravel elixir that concatenates and registers AngularJS templates in the $templateCache.

Install

npm install --save laravel-elixir-ng-templates

Usage

Example Gulpfile:

var elixir = require("laravel-elixir");
 
require("laravel-elixir-ng-templates");
 
elixir(function(mix) {
  mix.ngTemplates();
});
 

Arguments

source:
  • a globbing path that is passed to gulp.src()
  • defaults to resources/assets/templates/**/*.html
output:
  • output directory for the compiled file
  • defaults to resources/assets/js/templates.js
options:
  • options object for gulp-angular-templatecache
  • for a list of options check their docs

Advanced example

elixir(function(mix) {
  mix.ngTemplates('some/other/dir/**/*.html', 'public/assets', {
    filename: 'angular-tpls.js',
    root: 'tpls/',
    module: 'tpls'
  });
});

TODO

  • watch
  • sourcemaps (?)

Package Sidebar

Install

npm i laravel-elixir-ng-templates

Weekly Downloads

2

Version

0.1.3

License

MIT

Last publish

Collaborators

  • deiucanta