tasks/lib/utils.js
function(url, version, config) {
		if (!config.rewriteScheme) {
			return url;
		}

		var basename = path.basename(url);
		var ext = path.extname(url).substr(1);
		var filename = basename.replace(new RegExp('\\.' + ext + '$'), '');

		var data = {
			url: url,
			dirname: path.dirname(url),
			basename: basename,
			ext: ext,
			filename: filename,
			version: version
		};

		if (typeof config.rewriteScheme == 'string') {
			return _.template(config.rewriteScheme, data);
		}

		return config.rewriteScheme(data);
	}
function(url, version, config) {
		if (!config.rewriteScheme) {
			return url;
		}

		var basename = path.basename(url);
		var ext = path.extname(url).substr(1);
		var filename = basename.replace(new RegExp('\\.' + ext + '$'), '');

		var data = {
			url: url,
			dirname: path.dirname(url),
			basename: basename,
			ext: ext,
			filename: filename,
			version: version
		};

		if (typeof config.rewriteScheme == 'string') {
			return _.template(config.rewriteScheme, data);
		}

		return config.rewriteScheme(data);
	}
function ( url , version , config ) { if ( ! config . rewriteScheme ) { return url ; } var basename = path . basename ( url ) ; var ext = path . extname ( url ) . substr ( 1 ) ; var filename = basename . replace ( new RegExp ( '\\.' + ext + '$' ) , '' ) ; var data = { url : url , dirname : path . dirname ( url ) , basename : basename , ext : ext , filename : filename , version : version } ; if ( typeof config . rewriteScheme == 'string' ) { return _ . template ( config . rewriteScheme , data ) ; } return config . rewriteScheme ( data ) ; }
Creates versioned URL from original one
@param  {String} url     Original URL
@param  {String} version Cache-busting token
@param  {Object} config
@return {String}
Creates versioned URL from original one