jeudi 28 juillet 2016

Elixir versioning with SCSS and JavaScript

How do I chain Elixir's .version() method with others? My gulpfile.js looks like this:

elixir(function(mix) {
    mix.sass("frontend/frontend.scss", "public/css/app.css")
       .sass("backend/backend.scss", "public/css/admin.css")
       .scripts(js, "public/js/app.js");
});

Do I just call .version() after this chain on my generated files? Like this:

elixir(function(mix) {
    mix.sass("frontend/frontend.scss", "public/css/app.css")
       .sass("backend/backend.scss", "public/css/admin.css")
       .scripts(js, "public/js/app.js")
       .version(["public/css/app.css", "public/css/admin.css", "public/js/app.js"]);
});

Or is there some way to combine .sass() and .scripts() methods with .version() to avoid repeating file names?

Another problem with my example is that it produces redundant unversioned files prior to creating versioned ones, so I have useless files there.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2areZ3R
via IFTTT

Aucun commentaire:

Enregistrer un commentaire