https://github.com/cogoo/readini
(/reeːˈdiːni/;)
https://github.com/cogoo/readini
Last synced: 2 months ago
JSON representation
(/reeːˈdiːni/;)
- Host: GitHub
- URL: https://github.com/cogoo/readini
- Owner: cogoo
- License: mit
- Created: 2020-08-25T22:01:55.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-25T22:02:21.000Z (almost 5 years ago)
- Last Synced: 2025-02-01T09:42:53.935Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ReadIni (/reeːˈdiːni/;)
> Read custom format `.ini` or `.conf` configuration files
## Prerequisites
Get the correct Node version with [NVM]:
[nvm]: https://github.com/nvm-sh/nvm
```bash
nvm use
```## Getting Started
These instructions will get the project running on your local machine
### Installing / Set-up
Install the dependencies:
```bash
npm install
```Start the NodeJS REPL:
```bash
node
```Load the script in the Node REPL
```bash
> .load src/index.js
> CONFIG = load_config('./tests/__mocks__/settings.conf', []);
```You can now query the config file
```bash
> CONFIG.ftp.name
# returns "hello there, ftp uploading"
```## Running the tests
This project uses [Jest] as the test runner
[jest]: https://jestjs.io/
### Unit tests with Jest
```bash
npm run test
```## Links
- [Architectural Design Record](./docs/PARSE_CONFIG.md) - Record of important decisions made along with its context and consequences.
- [Friction Log](./docs/FRICTION_LOG.md) - Chronological log of what I tried and some thoughts.## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details