szainmehdi
968
7
Mix

Laravel Elixir - Multiple sets of scripts

Posted 4 years ago by szainmehdi

Hey guys:

I've started using Laravel 5.0 for a quick project, and I've run into this issue with Laravel Elixir. I'm not sure if I'm doing something wrong here, so any help would be much appreciated.

My Gulpfile.js looks like this:

elixir(function(mix) {
    mix.less(["backend.less", "frontend.less"])
        .scripts(
            [
                'jquery/dist/jquery.min.js',
                'bootstrap/dist/js/bootstrap.min.js',
                'jasny-bootstrap/dist/js/jasny-bootstrap.min.js'
            ],
            'bower_components',
            'public/js/dependencies.min.js'
        )
        .scripts(
            [
                'js/main.js',
                'js/etc.js',
            ],
            'resources/assets',
            'public/js/app.min.js'
        )
        .routes()
        .events()
        .phpUnit();

});

The issue is that only the last scripts call is working. The intended result of this setup is to have an app.min.js file and a dependencies.min.js file created. ONLY the app.min.js is being created.

Please sign in or create an account to participate in this conversation.