Support the ongoing development of Laravel.io →
Configuration Architecture Installation
Last updated 2 years ago.
0

what is the use case of multiple gulp files ?

0

@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.

Last updated 7 years ago.
0

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');
}
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.