5

I have this gulpfile.js https://gist.github.com/kristapsveveris/c25ba60984d8f3602d68

When I run gulp task, the result is :


(source: maxtraffic.com)

rev-manifest.json contains :

{
  "assets/js/all.js": "assets/js/all-d764f790.js",
  "assets/css/all.css": "assets/css/all-189848ae.css",
  "assets/css/serve-desktop.css": "assets/css/serve-desktop-037f21da.css",
  "assets/css/serve-mobile.css": "assets/css/serve-mobile-b0a650b6.css"
}

So the problem is that versioning doesn't create 'campaign.js' and 'serve.js' only their .map files

And if I run :

 gulp --production && gulp version --production

All versioning file are created

I'm running gulp tasks from windows

Community
  • 1
  • 1
Kristapsv
  • 558
  • 5
  • 15

1 Answers1

2

What version of laravel-elixir are you using? This was a bug with elixir < v0.14.2

It looks like when concatenating a lot of files (or more likely, the output file is large), then it did not get versioned with the rest of the files.

It looks like you can run gulp version separately and they will get versioned. If you are experiencing this issue then gulp or gulp watch will not do it.

Here is my gulp file, vendor.js was being compiled but not versioned. It is not even the last file being versioned:

var elixir = require('laravel-elixir');

elixir(function(mix) {

    mix.sass('app.scss')

    .scripts([
        'react/react-with-addons.min.js',
        'jquery/dist/jquery.min.js',
        'bootstrap-sass-official/assets/javascripts/bootstrap.js'
    ], 'public/js/vendor.js', 'resources/assets/bower')

    .scripts(['app.js'], 'public/js/app.js', 'resources/assets/js')

    .version([
        'css/app.css',
        'js/vendor.js',
        'js/app.js'
    ]);

});

Running gulp version afterwards will version it.

It was fixed for me with laravel-elixir v0.14.2

ryanwinchester
  • 11,737
  • 5
  • 27
  • 45
  • Updated laravel-elixir from 0.14.0 to 0.18.7 and it fixed versioning problem. Now elixir throws this notification when compiling "File not found: ./vendor/bower_components/bootsrapvalidator/dist/js/bootstrapValidator.min.js" but in reality file is included, so it isn't a problem. Thank you. – Kristapsv Apr 28 '15 at 08:44
  • 1
    Had problems with 0.18.* version so moved to 0.14.2 as you suggested and now everything works as expected – Kristapsv Apr 29 '15 at 13:12