Skip to content

Commit

Permalink
docs(readme): update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Feb 2, 2021
1 parent 8a516c5 commit f8469bf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const output = pretty(new Error('foo'), options)
#### `options`

| name | type | required | default | description |
| ---------- | --------- | -------- | --------------- | ---------------------------------------- |
|------------|-----------|----------|-----------------|------------------------------------------|
| **source** | `Boolean` || `false` | Show source code in stack |
| **native** | `Boolean` || `false` | Show native code in stack |
| **color** | `Boolean` || `true` | use ansi colors |
Expand All @@ -41,22 +41,22 @@ const output = pretty(new Error('foo'), options)
This is the preferred approach to best avoid mistakingly including into production builds

1. setup your [`NODE_PATH`](https://nodejs.org/docs/latest/api/modules.html#modules_loading_from_the_global_folders) environment variable

``` shell
export NODE_PATH="$NODE_PATH:$(npm root -g)"
```

2. install `pretty-exceptions`

``` shell
npm install --global pretty-exceptions
```

3. run your application with the [`--require`](https://nodejs.org/api/cli.html#cli_r_require_module) flag:

``` shell
node --require pretty-exceptions my-app.js
# alternative modes (see below):
node --require pretty-exceptions/source my-app.js
```
Expand All @@ -78,12 +78,12 @@ alias node='node --require pretty-exceptions/source'
#### Environment Variables

| env | default | description |
| -------------------------- | ------- | ------------------------- |
|----------------------------|---------|---------------------------|
| `PRETTY_EXCEPTIONS_SOURCE` | `0` | Show source code in stack |
| `PRETTY_EXCEPTIONS_NATIVE` | `0` | Show native code in stack |
| `PRETTY_EXCEPTIONS_COLOR` | `1` | use ansi colors |

### Source *(if you really must\!)*
### Source *(if you really must!)*

Require at the top-most entry point of your app:

Expand Down

0 comments on commit f8469bf

Please sign in to comment.