Skip to content

Commit 023f43e

Browse files
committed
Adapts docs to the npm package
1 parent e395575 commit 023f43e

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
!lib/*.js
55
!LICENSE
66
!package.json
7-
!test
7+
!test/*

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@ We recommend using the [Mapbox Directions Matrix](https://www.mapbox.com/api-doc
1111

1212
[![Example](https://raw.githubusercontent.com/mapbox/node-or-tools/master/example/solution.png?token=AAgLiX1m1BDa8ll0Lsk0xc6fz0RgQA1Lks5Y-VmAwA)](https://github.com/mapbox/node-or-tools/blob/master/example/solution.geojson)
1313

14-
### Installing
14+
### Quick Start
1515

16-
Update your Node.js and NPM versions via [nvm](https://github.com/creationix/nvm).
16+
npm install node_or_tools
1717

18-
nvm install 4
19-
nvm use 4
18+
```c++
19+
var ortools = require('node_or_tools')
2020

21-
Then
21+
var VRP = new ortools.VRP(solverOpts);
2222

23-
npm install
24-
25-
or if you are root
23+
VRP.Solve(searchOpts, function (err, solution) {
24+
// ..
25+
});
26+
```
2627

27-
npm install --unsafe-perm
28+
See [API.md](API.md) for interface documentation and [the example](./example/README.md) for a small self-contained example.
2829

2930
We ship pre-built native binaries (for Node.js LTS 4 and 6 on Linux and macOS).
30-
You will need a compatible C++ stdlib. Building from source is supported, too:
31-
32-
npm install --build-from-source
31+
You will need a compatible C++ stdlib, see below if you encounter issues.
32+
Building from source is supported via the `--build-from-source` flag.
3333

3434
#### Ubuntu 14.04
3535

0 commit comments

Comments
 (0)