@@ -23,7 +23,7 @@ etc.), regardless of what version of Node.js is actually installed on your syste
23
23
You can install ` node-gyp ` using ` npm ` :
24
24
25
25
``` bash
26
- $ npm install -g node-gyp
26
+ npm install -g node-gyp
27
27
```
28
28
29
29
Depending on your operating system, you will need to install:
@@ -71,15 +71,15 @@ version `node-gyp` should use in one of the following ways:
71
71
1 . by setting the ` --python ` command-line option, e.g.:
72
72
73
73
``` bash
74
- $ node-gyp < command> --python /path/to/executable/python
74
+ node-gyp < command> --python /path/to/executable/python
75
75
```
76
76
77
77
2 . If ` node-gyp ` is called by way of ` npm ` , * and* you have multiple versions of
78
78
Python installed, then you can set ` npm ` 's 'python' config key to the appropriate
79
79
value:
80
80
81
81
``` bash
82
- $ npm config set python /path/to/executable/python
82
+ npm config set python /path/to/executable/python
83
83
```
84
84
85
85
3 . If the ` PYTHON ` environment variable is set to the path of a Python executable,
@@ -95,20 +95,20 @@ searching will be done.
95
95
To compile your native addon, first go to its root directory:
96
96
97
97
``` bash
98
- $ cd my_node_addon
98
+ cd my_node_addon
99
99
```
100
100
101
101
The next step is to generate the appropriate project build files for the current
102
102
platform. Use ` configure ` for that:
103
103
104
104
``` bash
105
- $ node-gyp configure
105
+ node-gyp configure
106
106
```
107
107
108
108
Auto-detection fails for Visual C++ Build Tools 2015, so ` --msvs_version=2015 `
109
109
needs to be added (not needed when run by npm as configured above):
110
110
``` bash
111
- $ node-gyp configure --msvs_version=2015
111
+ node-gyp configure --msvs_version=2015
112
112
```
113
113
114
114
__ Note__ : The ` configure ` step looks for a ` binding.gyp ` file in the current
@@ -118,7 +118,7 @@ Now you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file
118
118
(on Windows) in the ` build/ ` directory. Next, invoke the ` build ` command:
119
119
120
120
``` bash
121
- $ node-gyp build
121
+ node-gyp build
122
122
```
123
123
124
124
Now you have your compiled ` .node ` bindings file! The compiled bindings end up
@@ -214,13 +214,13 @@ For example, to set `devdir` equal to `/tmp/.gyp`, you would:
214
214
Run this on Unix:
215
215
216
216
``` bash
217
- $ export npm_config_devdir=/tmp/.gyp
217
+ export npm_config_devdir=/tmp/.gyp
218
218
```
219
219
220
220
Or this on Windows:
221
221
222
222
``` console
223
- > set npm_config_devdir=c:\t emp\. gyp
223
+ set npm_config_devdir=c:\temp\.gyp
224
224
```
225
225
226
226
### ` npm ` configuration
@@ -230,7 +230,7 @@ Use the form `OPTION_NAME` for any of the command options listed above.
230
230
For example, to set ` devdir ` equal to ` /tmp/.gyp ` , you would run:
231
231
232
232
``` bash
233
- $ npm config set [--global] devdir /tmp/.gyp
233
+ npm config set [--global] devdir /tmp/.gyp
234
234
```
235
235
236
236
** Note:** Configuration set via ` npm ` will only be used when ` node-gyp `
0 commit comments