0.1.3 • Published 9 years ago

laravel-elixir-ng-templates v0.1.3

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

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 (?)