Resolve short environment aliases.
Status
Source | Shields |
---|---|
Project | |
Health | |
Repository | |
Activity |
Installation
bower install purescript-env-names
Usage
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"
Tests
To run tests:
pulp test
Documentation
This repository's documentation is hosted on Pursuit.
Linters
To run linters:
nps lint
Formatters
To run formatters:
nps format
Continuous integration
This repository uses GitHub Actions to lint and test each commit. Each commit should be formatted and its corresponding documentation should be updated.
Versioning
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
Changelog
Please read this repository's changelog for details on changes that have been made.
Contributing
Please read this repository's guidelines on contributing for details on the process for submitting pull requests. Moreover, our code of conduct declares our collaboration standards.
Contributors
- Joel Lefkowitz - Initial work
Remarks
Lots of love to the open source community!