Skip to content

Commit 8e5f335

Browse files
committed
README updates
1 parent 8ffacbc commit 8e5f335

1 file changed

Lines changed: 33 additions & 49 deletions

File tree

README.md

Lines changed: 33 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ NodeGit
3939

4040
## Maintained by ##
4141
Tim Branyen [@tbranyen](http://twitter.com/tbranyen),
42-
John Haley [@johnhaley81](http://twitter.com/johnhaley81),
43-
Max Korp [@maxkorp](http://twitter.com/MaximilianoKorp), and
44-
Steve Smith [@orderedlist](https://twitter.com/orderedlist) with help from tons of
42+
John Haley [@johnhaley81](http://twitter.com/johnhaley81), and
43+
Max Korp [@maxkorp](http://twitter.com/MaximilianoKorp) with help from tons of
4544
[awesome contributors](https://github.com/nodegit/nodegit/contributors)!
4645

4746
### Alumni Maintainers ###
47+
Steve Smith [@orderedlist](https://twitter.com/orderedlist),
4848
Michael Robinson [@codeofinterest](http://twitter.com/codeofinterest), and
4949
Nick Kallen [@nk](http://twitter.com/nk)
5050

@@ -61,20 +61,42 @@ dependencies.
6161
npm install nodegit
6262
```
6363

64-
**Note: NodeGit will only work on io.js Windows with [the iojs binary instead of node](https://github.com/rvagg/pangyp/issues/4).**
64+
If you receive errors about libstdc++, which are commonly experienced when
65+
building on Travis-CI, you can fix this by upgrading to the latest
66+
libstdc++-4.9.
6567

66-
If you encounter problems while installing, you should try the [Building from
67-
source](http://www.nodegit.org/guides/install/from-source/) instructions.
68+
In Ubuntu:
69+
70+
``` sh
71+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
72+
sudo apt-get update
73+
sudo apt-get install libstdc++-4.9-dev
74+
```
75+
76+
In Travis:
77+
78+
``` yaml
79+
addons:
80+
apt:
81+
sources:
82+
- ubuntu-toolchain-r-test
83+
packages:
84+
- libstdc++-4.9-dev
85+
```
86+
87+
If you are still encountering problems while installing, you should try the
88+
[Building from source](http://www.nodegit.org/guides/install/from-source/)
89+
instructions.
6890
6991
## API examples. ##
7092
7193
### Cloning a repository and reading a file: ###
7294
7395
``` javascript
74-
var clone = require("nodegit").Clone.clone;
96+
var Git = require("nodegit");
7597

76-
// Clone a given repository into a specific folder.
77-
clone("https://github.com/nodegit/nodegit", "tmp", null)
98+
// Clone a given repository into the `./tmp` folder.
99+
Git.Clone("https://github.com/nodegit/nodegit", "./tmp")
78100
// Look up this known commit.
79101
.then(function(repo) {
80102
// Use a known commit sha from this repository.
@@ -110,10 +132,10 @@ clone("https://github.com/nodegit/nodegit", "tmp", null)
110132
### Emulating git log: ###
111133

112134
``` javascript
113-
var open = require("nodegit").Repository.open;
135+
var Git = require("nodegit");
114136

115137
// Open the repository directory.
116-
open("tmp")
138+
Git.Repository.open("tmp")
117139
// Open the master branch.
118140
.then(function(repo) {
119141
return repo.getMasterCommit();
@@ -163,41 +185,3 @@ You will need to build locally before running the tests. See above.
163185
``` bash
164186
npm test
165187
```
166-
167-
## Migrating from old versions. ##
168-
169-
The bump from 0.1.4 to 0.2.0 was a big one. Many things changed, see here:
170-
https://github.com/nodegit/nodegit/compare/v0.1.4...v0.2.0
171-
172-
This update is wholly and entirely a breaking one, and older versions won't be
173-
maintained. For the purpose of migration, perhaps the biggest point to make
174-
is that async methods can now use promises, rather than just taking callbacks.
175-
Additionally, lots of method and property names have changed.
176-
177-
## nw.js (Node-Webkit) ##
178-
179-
### Native compilation for nw.js ###
180-
A common issue is with NodeGit not functioning properly inside of
181-
[nw.js](http://github.com/nwjs/nw.js) applications. Because NodeGit
182-
is a native module, it has to be rebuilt for node-webkit using
183-
[nw-gyp](http://github.com/rogerwang/nw-gyp). By default, NodeGit will look
184-
in the root package's package.json for an `engines` property, and within look
185-
for a `nw.js` property (or a `node-webkit` if the prior isn't found) that holds
186-
a specific version of nw.js. The value of this property is what will get passed
187-
as the `--target` argument to `nw-gyp configure`.
188-
189-
### Version incompatibility ###
190-
Prior to version 0.2.6, NodeGit used [nan](http://github.com/rvagg/nan) v1.4.3.
191-
As of 0.2.6, NodeGit uses nan v1.5.1 to provide support for io.js. Unfortunately,
192-
this breaks some nw.js compatibility. With nw.js 0.12+, the name was changed to
193-
nw.js from node-webkit. The alpha currently still breaks with NodeGit due to the
194-
nan update, but should be fixed in the final v0.12.0 release. Åpplications using
195-
previous versions of node webkit have 2 options:
196-
1) Use an older version (v0.2.4 or earlier) of NodeGit
197-
2) Use [npm shrinkwrap](https://docs.npmjs.com/cli/shrinkwrap) to force NodeGit to
198-
use nan v1.4.3. Since the binary always recompiles when being used with nw.js, you
199-
shouldn't have to do anything else to make sure it works. As of NodeGit v0.2.6,
200-
the change to nan v1.4.3 doesn't cause any problems.
201-
202-
Currently, support for nw.js is limited, although we intend to support it better
203-
in the future.

0 commit comments

Comments
 (0)