Skip to content

Commit

Permalink
docs: Addressing grammar and style comments
Browse files Browse the repository at this point in the history
  • Loading branch information
honzajavorek committed May 16, 2017
1 parent 6d16a2b commit 3c53fd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/CONTRIBUTING.md
Expand Up @@ -88,9 +88,11 @@ to npm, but also for running user-provided hooks written in CoffeeScript.

### Compiled vs pure JavaScript

Dredd uses [Drafter][] for parsing [API Blueprint][] documents. Drafter is written in C++11 and needs to be compiled during installation. Since that can be problematic for some environments and leads to a lot of troubleshooting, there's also pure JavaScript version of the parser, [drafter.js][]. While drafter.js is fully equivalent, it can have slower performance. That's why there's [drafter-npm][] package, which first tries to compile the C++11 version of the parser and if it's unsuccessful, uses the JavaScript equivalent.
Dredd uses [Drafter][] for parsing [API Blueprint][] documents. Drafter is written in C++11 and needs to be compiled during installation. Because that can cause a lot of problems in some environments, there's also pure JavaScript version of the parser, [drafter.js][]. Drafter.js is fully equivalent, but it can have slower performance. Therefore there's [drafter-npm][] package, which tries to compile the C++11 version of the parser and uses the JavaScript equivalent in case of failure.

Dredd depends on the [drafter-npm][] package. That's why you can see `node-gyp` errors and failures during Dredd installation, although after the installation is done, Dredd seems to normally work and correctly parses API Blueprint documents. Usual problems leading to the JavaScript version of the parser being used as fallback:
Dredd depends on the [drafter-npm][] package. That's the reason why you can see `node-gyp` errors and failures during the installation process, even though when it's done, Dredd seems to normally work and correctly parses API Blueprint documents.

Usual problems causing Dredd to use the JavaScript version of the parser as a fallback:

- **Your machine is missing a C++11 compiler.** See how to fix this on [Windows][Windows C++11] or [Travis CI][Travis CI C++11].
- **npm was used with Python 3.** `node-gyp`, which performs the compilation, doesn't support Python 3. If your default Python is 3 (see `python --version`), [tell npm to use an older version][npm Python].
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.md
Expand Up @@ -44,9 +44,9 @@ If you work on projects installable by `npm`, i.e. projects containing `package.
- **For development**, always go with the latest version.
- **For testing in [CI][]**, always pin your Dredd version to a specific number and upgrade to newer releases manually (but often!).

### Why I'm Seeing Network Errors?
### Why Am I Seeing Network Errors?

If you're in restricted network (VPN, firewall, proxy), it's possible you see errors similar to the following ones:
In a restricted network (VPN, firewall, proxy) you can see errors similar to the following ones:

```text
npmERR! Cannot read property 'path' of null
Expand Down

0 comments on commit 3c53fd9

Please sign in to comment.