src/cheers.js
/**
 * Sets user configurations
 * @param {object} options User defined configurations
 */
Sets user configurations
@param {object} options User defined configurations
Sets user configurations @param { object } options User defined configurations
function config(options = {}) {
  if (!options) throw Error('Options must be a valid object');
  globalConfig.cwd = options.cwd ?? globalConfig.cwd;
  globalConfig.watchMode = options.watchMode ?? globalConfig.watchMode;
  globalConfig.output = concatObjects(globalConfig.output, options.output ?? {});
  globalConfig.build = concatObjects(globalConfig.build, options.build ?? {});
  globalConfig.site = concatObjects(globalConfig.site, options.site ?? {});
  globalConfig.plugins.css = concatLists(globalConfig.plugins, options.plugins, 'css');
  globalConfig.assets.trust = concatLists(globalConfig.assets, options.assets, 'trust');
}
function config ( options = { } ) { if ( ! options ) throw Error ( 'Options must be a valid object' ) ; globalConfig . cwd = options . cwd ?? globalConfig . cwd ; globalConfig . watchMode = options . watchMode ?? globalConfig . watchMode ; globalConfig . output = concatObjects ( globalConfig . output , options . output ?? { } ) ; globalConfig . build = concatObjects ( globalConfig . build , options . build ?? { } ) ; globalConfig . site = concatObjects ( globalConfig . site , options . site ?? { } ) ; globalConfig . plugins . css = concatLists ( globalConfig . plugins , options . plugins , 'css' ) ; globalConfig . assets . trust = concatLists ( globalConfig . assets , options . assets , 'trust' ) ; }
Sets user configurations
 @param {object} options User defined configurations
Sets user configurations @param { object } options User defined configurations