Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/3p3r/opshun
type safe "rc"
https://github.com/3p3r/opshun
config defaults rc unix
Last synced: 13 days ago
JSON representation
type safe "rc"
- Host: GitHub
- URL: https://github.com/3p3r/opshun
- Owner: 3p3r
- License: mit
- Created: 2020-05-26T18:53:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-05T13:31:49.000Z (over 3 years ago)
- Last Synced: 2024-10-31T17:58:46.512Z (15 days ago)
- Topics: config, defaults, rc, unix
- Language: JavaScript
- Size: 124 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# opshun
type-safe version of the [rc package](https://www.npmjs.com/package/rc).
## why
this is a drop-in replacement for the rc package that accomplishes:
1. enabling type safety (original rc reads everything as strings)
1. logging flat version of the parsed config for debugging
1. fixing VSCode's intellisense references to the package## usage
in your project:
```bash
npm install --save opshun
```in your code:
```JS
const rc = require('opshun);
const conf = rc(appname, {
//defaults go here.
port: 2468,
//defaults which are objects will be merged, not replaced
views: {
engine: 'jade'
}
});
```