I am using angular-js as the front end and using / attempting to use Elixir to manage the assets.
So far with just the basics it works fine, as soon as I add in external plugins it breaks. Errors, unable to load app and multitude of errors essentially breaking the app.
gulp.js file
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Less
| file for our application, as well as publishing vendor resources.
|
*/
elixir(function(mix) {
mix.less(
'app.less'
)
.scripts([
'libs/**/*.js',
'app.js',
'appRoutes.js',
'controllers/**/*.js',
'services/**/*.js',
'directives/**/*.js',
'filters/**/*.js',
]);
});
Does anyone have any idea the proper recipe to have elixir properly merger / minify the angular js files? Proper order?
Thanks,
Dave
It's pretty easy to write your own gulpfile if you're having problems with Elixir.
All you're doing is compiling some scripts and styles, Gulp does that in a couple of lines and you can add live reload very easily.
I decided to do this recently as I wanted more control, was finding that the watch task was taking too long, and didn't like the fact that when things did go wrong, there wasn't any documentation to help.
Here's my gulp setup:
It creates:
Also includes:
Thanks for the script :)
Will try this way and see how it goes.
Much appreciated.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community