Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
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
26 changes: 8 additions & 18 deletions 26 guides/install/electron/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,14 @@ description: How to install NodeGit with Electron
Install for Electron
----------------------

For an application that is built using [Electron](https://github.com/atom/Electron) you'll need to have the `engines.electron` set to the version of Electron that you are targeting in your root `package.json` file.
Please see the official electron docs [here](https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md)

For example if you have an Electron app that's targeting version 0.20.7 your package.json file would look something like:

```json
{
"name": "elec-app",
"displayName": "My Electron app",
"version": "0.0.1",
"description": "",
"main": "main.js",
"author": "",
"engines": {
"electron": "0.20.7"
}
}
For a slightly simpler version of the first method, use an `.npmrc` file. For example if you have an Electron app that's targeting version 1.2.8 your .npmrc file would look something like:
```
runtime = electron
target = 1.2.8
target_arch = x64
disturl = https://atom.io/download/atom-shell
```

And when doing an `npm install` or `apm install` inside of your Electron's root folder it will compile NodeGit targeting that version of Electron during the install.

*NOTE: there are no pre-built binaries for Electron, you must rebuild NodeGit. Visit our [building guides](../from-source) for help*
*NOTE: We try to provide prebuilt binaries for electron, but we don't always have them available for every version. If prebuilts are not available and you have trouble with local compilation, visit our [building guides](../from-source) for help*
24 changes: 8 additions & 16 deletions 24 guides/install/nw.js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,14 @@ description: How to install NodeGit with NW.js
Install for nwjs
----------------

For an application that is built using [NW.js](https://github.com/nwjs/nw.js) you'll need to have the `engines['nw.js']` set to the version of NW.js that you are targeting in your root `package.json` file.
Please see the official nw.js docs [here](http://docs.nwjs.io/en/latest/For%20Users/Advanced/Use%20Native%20Node%20Modules/#node-pre-gyp)

For example if you have an NS.js app that's targeting version 0.12.0 your package.json file would look something like

```json
{
"name": "nw-app",
"displayName": "My NW.js app",
"version": "0.0.1",
"description": "",
"engines": {
"nw.js": "0.12.0"
}
}
For a slightly simpler version of the third method, use an `.npmrc` file. For example if you have an NW.js app that's targeting version 0.13.0, your `.npmrc` file would look something like:
```
runtime = node-webkit
target = 0.13.0
target_arch = x64
disturl = http://node-webkit.s3.amazonaws.com
```

And when doing an `npm install` inside of your NW.js app's root folder it will compile NodeGit targeting that version of NW.js during the install.

*NOTE: there are no pre-built binaries for NW.js, you must rebuild NodeGit. Visit our [building guides](../from-source) for help*
*NOTE: NW.js support is not thoroughly tested. Additionally, there are no pre-built binaries for NW.js, you must compile NodeGit. Visit our [building guides](../from-source) for help*
Morty Proxy This is a proxified and sanitized view of the page, visit original site.