Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enabled syntax highlighting #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ To ensure that string representations of booleans and numbers are always convert

## Simple example demonstrating precedence
Assume you have an application like this (notice the hard-coded defaults passed to rc):
```
```js
const conf = require('rc')('myapp', {
port: 12345,
mode: 'test'
Expand All @@ -128,15 +128,15 @@ const conf = require('rc')('myapp', {
console.log(JSON.stringify(conf, null, 2));
```
You also have a file `config.json`, with these contents:
```
```json
{
"port": 9000,
"foo": "from config json",
"something": "else"
}
```
And a file `.myapprc` in the same folder, with these contents:
```
```json
{
"port": "3001",
"foo": "bar"
Expand All @@ -145,7 +145,7 @@ And a file `.myapprc` in the same folder, with these contents:
Here is the expected output from various commands:

`node .`
```
```json
{
"port": "3001",
"mode": "test",
Expand All @@ -161,7 +161,7 @@ Here is the expected output from various commands:


`node . --foo baz`
```
```json
{
"port": "3001",
"mode": "test",
Expand All @@ -176,7 +176,7 @@ Here is the expected output from various commands:
*Same result as above but `foo` is overridden because command-line arguments take precedence over `.myapprc` file.*

`node . --foo barbar --config config.json`
```
```json
{
"port": 9000,
"mode": "test",
Expand Down