Skip to content

Commit 7e803d5

Browse files
nschonnibnoordhuis
authored andcommitted
doc: headerify the Install instructions
Enable linking to the platform specific installation instructions PR-URL: #1225 Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent f275991 commit 7e803d5

File tree

1 file changed

+35
-25
lines changed

1 file changed

+35
-25
lines changed

README.md

+35-25
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
node-gyp
22
=========
3-
### Node.js native addon build tool
3+
## Node.js native addon build tool
44

55
`node-gyp` is a cross-platform command-line tool written in Node.js for compiling
66
native addon modules for Node.js. It bundles the [gyp](https://gyp.gsrc.io)
@@ -14,7 +14,7 @@ Multiple target versions of node are supported (i.e. `0.8`, ..., `4`, `5`, `6`,
1414
etc.), regardless of what version of node is actually installed on your system
1515
(`node-gyp` downloads the necessary development files or headers for the target version).
1616

17-
#### Features:
17+
## Features
1818

1919
* Easy to use, consistent interface
2020
* Same commands to build your module on every platform
@@ -32,29 +32,39 @@ $ npm install -g node-gyp
3232

3333
You will also need to install:
3434

35-
* On Unix:
36-
* `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported)
37-
* `make`
38-
* A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)
39-
* On Mac OS X:
40-
* `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) (already installed on Mac OS X)
41-
* [Xcode](https://developer.apple.com/xcode/download/)
42-
* You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Downloads`
43-
* This step will install `gcc` and the related toolchain containing `make`
44-
* On Windows:
45-
* Option 1: Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) using `npm install --global --production windows-build-tools` from an elevated PowerShell or CMD.exe (run as Administrator).
46-
* Option 2: Install tools and configuration manually:
47-
* Visual C++ Build Environment:
48-
* Option 1: Install [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) using the **Default Install** option.
49-
50-
* Option 2: Install [Visual Studio 2015](https://www.visualstudio.com/products/visual-studio-community-vs) (or modify an existing installation) and select *Common Tools for Visual C++* during setup. This also works with the free Community and Express for Desktop editions.
51-
52-
> :bulb: [Windows Vista / 7 only] requires [.NET Framework 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40773)
53-
54-
* Install [Python 2.7](https://www.python.org/downloads/) (`v3.x.x` is not supported), and run `npm config set python python2.7` (or see below for further instructions on specifying the proper Python version and path.)
55-
* Launch cmd, `npm config set msvs_version 2015`
56-
57-
If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.
35+
### On Unix
36+
37+
* `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported)
38+
* `make`
39+
* A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)
40+
41+
### On Mac OS X
42+
43+
* `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) (already installed on Mac OS X)
44+
* [Xcode](https://developer.apple.com/xcode/download/)
45+
* You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Downloads`
46+
* This step will install `gcc` and the related toolchain containing `make`
47+
48+
### On Windows
49+
50+
#### Option 1
51+
52+
Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) using `npm install --global --production windows-build-tools` from an elevated PowerShell or CMD.exe (run as Administrator).
53+
54+
#### Option 2
55+
56+
Install tools and configuration manually:
57+
* Visual C++ Build Environment:
58+
* Option 1: Install [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) using the **Default Install** option.
59+
60+
* Option 2: Install [Visual Studio 2015](https://www.visualstudio.com/products/visual-studio-community-vs) (or modify an existing installation) and select *Common Tools for Visual C++* during setup. This also works with the free Community and Express for Desktop editions.
61+
62+
> :bulb: [Windows Vista / 7 only] requires [.NET Framework 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40773)
63+
64+
* Install [Python 2.7](https://www.python.org/downloads/) (`v3.x.x` is not supported), and run `npm config set python python2.7` (or see below for further instructions on specifying the proper Python version and path.)
65+
* Launch cmd, `npm config set msvs_version 2015`
66+
67+
If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.
5868

5969
If you have multiple Python versions installed, you can identify which Python
6070
version `node-gyp` uses by setting the '--python' variable:

0 commit comments

Comments
 (0)