Elixir support - efficiently/jquery-laravel GitHub Wiki
If you don't want to use an asset pipeline package like Larasset you can use jQuery-Laravel with Elixir.
# Run theses commands in your Laravel root application:
php artisan vendor:publish --provider="Efficiently\JqueryLaravel\JqueryLaravelServiceProvider" --force
# Optional command: if you want to use the Turbolinks package (https://github.com/frenzyapp/turbolinks#readme)
php artisan vendor:publish --provider="Frenzy\Turbolinks\TurbolinksServiceProvider" --force
// Add this code in your gulpfile.js:
elixir(function(mix) {
mix.scripts([
'jquery.js',
'jquery.turbolinks.js',// Optional: if you want to use the Turbolinks package
'jquery_ujs.js',
'app.js',
'turbolinks.js'// Optional: if you want to use the Turbolinks package
]);
});
Finally, to compile the jQuery-Laravel scripts, run this command:
gulp