index.js
function loadTheme(props) {
	var relPath = '/' + props.join('/') + '.yml',
		defaultsPath = path.resolve(base + '/scss/themes/default' + relPath),
		customPath = (custom) ? custom + relPath : null,
		defaultVars = {},
		customVars = null,
		result = {};

	// Try loading a custom theme file
	customVars = loadYamlFile(customPath);

	// If merge mode is set to "replace", don't even load the defaults
	if (customVars && customVars['merge-mode'] === 'replace') {
		result = _.omit(customVars, 'merge-mode');
	} else {
		defaultVars = loadYamlFile(defaultsPath);
		result = _.merge(defaultVars, customVars);
	}

	// Store variables in cached theme var
	_.set(theme, props.join('.'), result);

	return result;
}
function loadTheme(props) {
	var relPath = '/' + props.join('/') + '.yml',
		defaultsPath = path.resolve(base + '/scss/themes/default' + relPath),
		customPath = (custom) ? custom + relPath : null,
		defaultVars = {},
		customVars = null,
		result = {};

	// Try loading a custom theme file
	customVars = loadYamlFile(customPath);

	// If merge mode is set to "replace", don't even load the defaults
	if (customVars && customVars['merge-mode'] === 'replace') {
		result = _.omit(customVars, 'merge-mode');
	} else {
		defaultVars = loadYamlFile(defaultsPath);
		result = _.merge(defaultVars, customVars);
	}

	// Store variables in cached theme var
	_.set(theme, props.join('.'), result);

	return result;
}
function loadTheme ( props ) { var relPath = '/' + props . join ( '/' ) + '.yml' , defaultsPath = path . resolve ( base + '/scss/themes/default' + relPath ) , customPath = ( custom ) ? custom + relPath : null , defaultVars = { } , customVars = null , result = { } ; // Try loading a custom theme file customVars = loadYamlFile ( customPath ) ; // If merge mode is set to "replace", don't even load the defaults if ( customVars && customVars [ 'merge-mode' ] === 'replace' ) { result = _ . omit ( customVars , 'merge-mode' ) ; } else { defaultVars = loadYamlFile ( defaultsPath ) ; result = _ . merge ( defaultVars , customVars ) ; } // Store variables in cached theme var _ . set ( theme , props . join ( '.' ) , result ) ; return result ; }
Load theme variables from a YAML file.

@param {Array} props
@return {Object} result
Load theme variables from a YAML file .