Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeppe Hasseriis committed Jan 14, 2020
1 parent 02081fa commit f8b4084
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Find and load json configuration from a package.json property, rc file, or CommonJS module.

Heavily inspired by [cosmiconfig](https://www.npmjs.com/package/cosmiconfig), but super simplified for minimal bundlesize.
Heavily inspired by [cosmiconfig](https://www.npmjs.com/package/cosmiconfig), but super simplified for minimal bundlesize.
The big difference from cosmiconfig is that **rcload does not support yaml files**.

**rcload** will search for the following:
Expand All @@ -14,6 +14,13 @@ The big difference from cosmiconfig is that **rcload does not support yaml files

It is also meant as a partial drop-in replacement which means it return a `result` object same as cosmiconfig.

## Differences from [cosmiconfig](https://www.npmjs.com/package/cosmiconfig)

- Supports only JSON and CommonJS formats.
- Only looks in `process.cwd()`.
- Limited options.
- Only synchronous load.

## Usage

Install as a dependency.
Expand Down Expand Up @@ -64,10 +71,3 @@ rcload('myapp', {
cwd: path.join(process.cwd(), 'configs')
})
```

## Differences from [cosmiconfig](https://www.npmjs.com/package/cosmiconfig)

- Supports only JSON and CommonJS formats.
- Only looks in `process.cwd()`.
- Limited options.
- Only synchronous load.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"keywords": [
"rc",
"config",
"json"
"json",
"node",
"nodejs"
]
}

0 comments on commit f8b4084

Please sign in to comment.