laravel-elixir-angular

A simple wrapper around Laravel Elixir for processing AngularJS scripts.

Module License: MIT

Added by: Sam Deering

GitHub

Repository

hrcc/laravel-elixir-angular

Stats

Stars: 7

Watchers: 7

Forks: 7

Author

HR
HR

Module Description

Usage

This is a simple wrapper around Laravel Elixir. Add it to your Elixir-enhanced Gulpfile, like so:

var elixir = require('laravel-elixir');

require('laravel-elixir-angular');

elixir(function(mix) {
   mix.angular();
});

This will scan your resources/assets/angular directory for all .js files. Offers check of your source files by JSHint, generates Sourcemaps, concatenates and minifies (if environment is set to production) the final script.

Directory structure in resources/assets/angular is not forced, the only limitation is to provide at least one *module.js script with module initialization:

var foo = angular.module('foo', []);

Example use of a nested structure might look like this:

 /resources
     /angular
         foo.module.js
         /some-feature
             some-feature.module.js
             some-feature.controller.js

Finally, if you'd like to output to a different directory than the default public/js, then you may override this, while changing the name of resulting script if desired:

mix.angular("resources/assets/angular/", "public/js/angular/", "application.js");

Module stats last updated: 2015-06-07 06:53:37

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!