packages/slate-env/index.js
function assign(name) {
  const envFileName = _getFileName(name);
  const envPath = path.resolve(config.get('env.rootDirectory'), envFileName);
  const result = dotenv.config({path: envPath});

  if (typeof name !== 'undefined' && result.error) {
    throw result.error;
  }

  _setEnvName(name);
}
function assign(name) {
  const envFileName = _getFileName(name);
  const envPath = path.resolve(config.get('env.rootDirectory'), envFileName);
  const result = dotenv.config({path: envPath});

  if (typeof name !== 'undefined' && result.error) {
    throw result.error;
  }

  _setEnvName(name);
}
function assign ( name ) { const envFileName = _getFileName ( name ) ; const envPath = path . resolve ( config . get ( 'env.rootDirectory' ) , envFileName ) ; const result = dotenv . config ( { path : envPath } ) ; if ( typeof name !== 'undefined' && result . error ) { throw result . error ; } _setEnvName ( name ) ; }
Reads an .env file and assigns their values to environment variables
Reads an . env file and assigns their values to environment variables