laravel-elixir-ng-scripts
Simple extension to laravel elixir that concatenates and annotates AngularJS files.
Install
npm install --save laravel-elixir-ng-scripts
Usage
Example Gulpfile:
var elixir = ; ; ;
Arguments
source
:
- this can be either an
array
or astring
- you can also pass a
json
file that contains an array - all files are prefixed with
options.baseDir
output
:
- output directory for the compiled file
- defaults to
public/js/app.js
options
:
- 'baseDir'
- all input paths are relative to this
- defaults to
resources/assets/js
- 'ngAnnotate'
- options for
gulp-ng-annotate
- defaults to
{ single_quotes: true }
- options for
ngTemplates
If you want to concatenate and register AngularJS templates in the $templateCache, you can use a separate package: laravel-elixir-ng-templates
Advanced example
Create a json array in resources/assets/js/scripts.json
In Gulpfile.js
;
HINT: I like to have bower components in resources/assets/vendor
.
TODO
- sourcemaps
- watch
- uglify