@astroanu - I am just avoiding gulping every page every time since its redundant and time-consuming if you have very many pages to gulp through every time. I also think its neat and more maintainable to separate your concerns. Added more details.
Figured out a solution - do all the versioning in the main gulpfile.js. This way, every page gets its assets only versioned (but not compiled) every time.
require('./gulp/elixir-extensions');
var elixir = require('laravel-elixir');
var args = require("yargs");
var file = args.argv.file;
if(file){
var filepath = './gulp/'+file;
require('./gulp/'+file);
elixir(function(mix) {
mix
/**
* Apply version control to all assets
*/
.version([
"public/css/auth.css",
"public/css/backend.css",
"public/js/backend.js",
"public/css/home.css",
"public/js/home.js",
"public/css/about.css",
"public/js/about.js",
])
// .phpUnit()
// .compressHtml()
});
}
else{
console.log('Pass the file: gulp --file:name');
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community