Resolve short environment aliases.
spago install env-names
Documentation and more detailed examples are hosted on Pursuit.
Environment names often have aliases such as development
and dev
. This can lead to development code finding its way into production, for example:
dangerous.js
if (process.env.NODE_ENV === "dev") {
...
} else {
console.log("Let's hope I'm fit for production");
}
> NODE_ENV=development node ./dangerous.js
"Let's hope I'm fit for production"
This package offers a preventative approach with parsers for common aliases:
> longEnv "dev"
"development"
> longEnv "development"
"development"
You can specify custom aliases too:
alias = (Alias "gulls" "seagulls")
> replaceShort "seagulls"
"gulls"
> replaceShort "gulls"
"gulls"
To install dependencies:
yarn install
yarn spago install
To run tests:
yarn spago test
To generate the documentation locally:
yarn spago docs
To run linters:
yarn lint
To run formatters:
yarn format
Please read this repository's Code of Conduct which outlines our collaboration standards and the Changelog for details on breaking changes that have been made.
This repository adheres to semantic versioning standards. For more information on semantic versioning visit SemVer.
Bump2version is used to version and tag changes. For example:
bump2version patch
- Joel Lefkowitz - Initial work
Lots of love to the open source community!