0

I'm having a little issue with elixir in laravel 5. Sass is working fine, but my scripts are not being moved to the public/js directory neither versioned. here is my gulpfile

 elixir(function(mix) {
 mix.sass('aracademia.scss')
 .scripts(
 [
 'partials/fancybox/jquery.fancybox.pack.js',
 'partials/jscroll.js',
 'aracademia.js',
 'partials/doubletaptogo.js'

 ],
 'resources/assets/scripts',
 'public/js/aracademia.min.js');
 mix.version(['public/css/aracademia.css','public/js/aracademia.min.js']);
 });

Any ideas?

Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291
Rachid
  • 101
  • 1
  • 9

1 Answers1

2

The problem is probably your paths. In script function as a 2nd parameter you should use destination location (not source) and as 3rd parameter source directory for your script files (and not destination), so in your case:

elixir(function(mix) {
 mix.sass('aracademia.scss')
 .scripts(
 [
 'partials/fancybox/jquery.fancybox.pack.js',
 'partials/jscroll.js',
 'aracademia.js',
 'partials/doubletaptogo.js'

 ], 
 'public/js/aracademia.min.js',
 'resources/assets/scripts'
);
 mix.version(['public/css/aracademia.css','public/js/aracademia.min.js']);
 });

should work assuming you have your js files in resources/assets/scripts directory

Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291
  • This is really hard to find in the documentation and it looks like the arguments order has changed some point recently. Quite confusing. But thanks for solving this for me too! – Simon Feb 10 '15 at 17:06