Laravel Elixr copy method not working

I am trying to copy some js files using elixr from vendor / bower_components folder, but they are not copied when running gulp.

elixir(function(mix) { mix.less('app.less')
  .copy('underscore/underscore.js', 'public/js/vendor/underscore.js'); });

      

Gulp error not specified.

[14:12:58] Using gulpfile ~/Public/balloonprinting_l5/gulpfile.js
[14:12:58] Starting 'default'... 
[14:12:58] Starting 'less'... 
[14:12:58] Running Less: resources/assets/less/app.less 
[14:12:59] Finished 'default' after 506 ms 
[14:13:00] gulp-notify: [Laravel Elixir] Less Compiled! 
[14:13:00] Finished 'less' after 1.74 s 
[14:13:00] Starting 'copy'... 
[14:13:00] Finished 'copy' after 2.86 ms

      

+3


source to share


1 answer


You need to provide the full path to the source file:

elixir(function(mix) { mix.less('app.less')
  .copy(
    'bower_components/underscore/underscore.js', 
    'public/js/vendor/underscore.js'
  ); 
});

      



As you can see I added bower_components/

to the original path, this is the default bower packages folder.

+1


source







All Articles