src/config.js
/**
 * Helper function that resolves any variable depenencies in the config.
 * @param {String} version - The version number supplied.
 * @param {Object} conf - The parsed config file.
 */
Helper function that resolves any variable depenencies in the config.
@param {String} version - The version number supplied.
@param {Object} conf - The parsed config file.
Helper function that resolves any variable depenencies in the config . @param { String } version - The version number supplied . @param { Object } conf - The parsed config file .
function resolveConfig(conf, version = '') {
	conf['siteroot'] = conf.baseurl || '/';
	if (version) {
		conf['baseurl'] = path.join(conf.siteroot, version);
	}
	for (let key in conf) {
		if (CONFIG_VAR_REGEX.test(conf[key])) {
			conf[key] = resolve(conf[key], conf, [key]);
		}
	}
	return conf;
}
function resolveConfig ( conf , version = '' ) { conf [ 'siteroot' ] = conf . baseurl || '/' ; if ( version ) { conf [ 'baseurl' ] = path . join ( conf . siteroot , version ) ; } for ( let key in conf ) { if ( CONFIG_VAR_REGEX . test ( conf [ key ] ) ) { conf [ key ] = resolve ( conf [ key ] , conf , [ key ] ) ; } } return conf ; }
Helper function that resolves any variable depenencies in the config.
Helper function that resolves any variable depenencies in the config .