lib/utils/config/index.js
function set(key, value) {
  let config = getGlobalConfig();
  if (key && typeof key === 'string' && typeof value !== 'undefined') {
    config = _.set(config, key, value);
  } else if (_.isObject(key)) {
    config = _.merge(config, key);
  } else if (typeof value !== 'undefined') {
    config = _.merge(config, value);
  }
  // update config meta
  config.meta = config.meta || {};
  config.meta.updated_at = Math.round(+new Date() / 1000);
  // write to .serverlessrc file
  writeFileAtomic.sync(serverlessrcPath, JSON.stringify(config, null, 2));
  return config;
}
function set(key, value) {
  let config = getGlobalConfig();
  if (key && typeof key === 'string' && typeof value !== 'undefined') {
    config = _.set(config, key, value);
  } else if (_.isObject(key)) {
    config = _.merge(config, key);
  } else if (typeof value !== 'undefined') {
    config = _.merge(config, value);
  }
  // update config meta
  config.meta = config.meta || {};
  config.meta.updated_at = Math.round(+new Date() / 1000);
  // write to .serverlessrc file
  writeFileAtomic.sync(serverlessrcPath, JSON.stringify(config, null, 2));
  return config;
}
function set ( key , value ) { let config = getGlobalConfig ( ) ; if ( key && typeof key === 'string' && typeof value !== 'undefined' ) { config = _ . set ( config , key , value ) ; } else if ( _ . isObject ( key ) ) { config = _ . merge ( config , key ) ; } else if ( typeof value !== 'undefined' ) { config = _ . merge ( config , value ) ; } // update config meta config . meta = config . meta || { } ; config . meta . updated_at = Math . round ( + new Date ( ) / 1000 ) ; // write to .serverlessrc file writeFileAtomic . sync ( serverlessrcPath , JSON . stringify ( config , null , 2 ) ) ; return config ; }
set global .serverlessrc config value.
set global . serverlessrc config value .