index.js
function getFilePathFromLine(bundleFile, line, variables) {
	// handle variables
	var varRegex = /@{([^}]+)}/;
	var match;
	while (match = line.match(varRegex)) {
		var varName = match[1];
		if (!variables || typeof (variables[varName]) === 'undefined')
			throw new gutil.PluginError(pluginName, bundleFile.path + ': variable "' + varName + '" is not specified');

		var varValue = variables[varName];
		line = line.substr(0, match.index) + varValue + line.substr(match.index + match[0].length);
	}

	if (line === '')
		return null;
	
	// handle `!` negated file paths
	var negative = line[0] === '!';
	if (negative)
		line = line.substr(1);

	// get file path for line
	var filePath;
	if (line.indexOf('./') === 0)
		filePath = path.resolve(bundleFile.cwd, line);
	else
		filePath = path.resolve(bundleFile.base, line);
	
	// return path
	if (negative)
		return '!' + filePath;
	return filePath;
}
function getFilePathFromLine(bundleFile, line, variables) {
	// handle variables
	var varRegex = /@{([^}]+)}/;
	var match;
	while (match = line.match(varRegex)) {
		var varName = match[1];
		if (!variables || typeof (variables[varName]) === 'undefined')
			throw new gutil.PluginError(pluginName, bundleFile.path + ': variable "' + varName + '" is not specified');

		var varValue = variables[varName];
		line = line.substr(0, match.index) + varValue + line.substr(match.index + match[0].length);
	}

	if (line === '')
		return null;
	
	// handle `!` negated file paths
	var negative = line[0] === '!';
	if (negative)
		line = line.substr(1);

	// get file path for line
	var filePath;
	if (line.indexOf('./') === 0)
		filePath = path.resolve(bundleFile.cwd, line);
	else
		filePath = path.resolve(bundleFile.base, line);
	
	// return path
	if (negative)
		return '!' + filePath;
	return filePath;
}
function getFilePathFromLine ( bundleFile , line , variables ) { // handle variables var varRegex = / @{([^}]+)} / ; var match ; while ( match = line . match ( varRegex ) ) { var varName = match [ 1 ] ; if ( ! variables || typeof ( variables [ varName ] ) === 'undefined' ) throw new gutil . PluginError ( pluginName , bundleFile . path + ': variable "' + varName + '" is not specified' ) ; var varValue = variables [ varName ] ; line = line . substr ( 0 , match . index ) + varValue + line . substr ( match . index + match [ 0 ] . length ) ; } if ( line === '' ) return null ; // handle `!` negated file paths var negative = line [ 0 ] === '!' ; if ( negative ) line = line . substr ( 1 ) ; // get file path for line var filePath ; if ( line . indexOf ( './' ) === 0 ) filePath = path . resolve ( bundleFile . cwd , line ) ; else filePath = path . resolve ( bundleFile . base , line ) ; // return path if ( negative ) return '!' + filePath ; return filePath ; }
parses file path from line in bundle file
parses file path from line in bundle file