gulpfile.js
function getLibPaths(libs, inject) {
	inject = inject || false;

	var libName,
		libSrcs = [],
		outSrcs = [];
	for (libName in libs) {
		libSrcs = libs[libName];
		if (typeof libSrcs === "string") {
			libSrcs = [libSrcs];
		}
		var basePath;
		if (inject === true) {
			// Adapt basepath for inject
			basePath = path.join(p.dest, p.libsDestSubDir, libName);
		}
		else {
			// Adapt basepath for libs' origin
			basePath = path.join(p.libsDir, libName);
		}
		libSrcs = libSrcs.map(function(src) {
			return path.join(basePath, src);
		});

		outSrcs = outSrcs.concat(libSrcs);
	}
	return outSrcs;
}
function getLibPaths(libs, inject) {
	inject = inject || false;

	var libName,
		libSrcs = [],
		outSrcs = [];
	for (libName in libs) {
		libSrcs = libs[libName];
		if (typeof libSrcs === "string") {
			libSrcs = [libSrcs];
		}
		var basePath;
		if (inject === true) {
			// Adapt basepath for inject
			basePath = path.join(p.dest, p.libsDestSubDir, libName);
		}
		else {
			// Adapt basepath for libs' origin
			basePath = path.join(p.libsDir, libName);
		}
		libSrcs = libSrcs.map(function(src) {
			return path.join(basePath, src);
		});

		outSrcs = outSrcs.concat(libSrcs);
	}
	return outSrcs;
}
function getLibPaths ( libs , inject ) { inject = inject || false ; var libName , libSrcs = [ ] , outSrcs = [ ] ; for ( libName in libs ) { libSrcs = libs [ libName ] ; if ( typeof libSrcs === "string" ) { libSrcs = [ libSrcs ] ; } var basePath ; if ( inject === true ) { // Adapt basepath for inject basePath = path . join ( p . dest , p . libsDestSubDir , libName ) ; } else { // Adapt basepath for libs' origin basePath = path . join ( p . libsDir , libName ) ; } libSrcs = libSrcs . map ( function ( src ) { return path . join ( basePath , src ) ; } ) ; outSrcs = outSrcs . concat ( libSrcs ) ; } return outSrcs ; }
Adapts the lib paths for moving and injecting by
adding a basepath.
@param  {Object} libs 	The libs in original key-value format
@param  {Boolean} inject	Get paths adapted for inject (if false, paths point to the lib source)
@return {Array}			Array of libs
Adapts the lib paths for moving and injecting by adding a basepath .