You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+23-55
Original file line number
Diff line number
Diff line change
@@ -25,50 +25,12 @@ npm install --save-dev nw
25
25
### Specific version with changes to installer:
26
26
27
27
```shell
28
-
npm install --save-dev nw@0.85.0-1
28
+
npm install --save-dev nw@0.94.1-1
29
29
```
30
30
31
31
> You may use `npm view nw versions` to view the list of available versions.
32
32
33
-
### Specify build flavor:
34
-
35
-
```shell
36
-
npm install --save-dev nw@sdk
37
-
```
38
-
39
-
Or set `nwjs_build_type=sdk` in `.npmrc` or `NWJS_BUILD_TYPE=sdk` environment variable.
40
-
41
-
### Specify platform:
42
-
43
-
Set `nwjs_platform` in `.npmrc` or `NWJS_PLATFORM` environment variable. Defaults to `process.platform`.
44
-
45
-
### Specify architecture:
46
-
47
-
Set `nwjs_arch` in `.npmrc` or `NWJS_ARCH` environment variable. Defaults to `process.arch`.
48
-
49
-
### Specify cache directory:
50
-
51
-
Set `nwjs_cache_dir` in `.npmrc` or `NWJS_ARCH` environment variable. Defaults to `./node_modules/nw`.
52
-
53
-
### Specify cache flag:
54
-
55
-
Set `nwjs_cache` in `.npmrc` or `NWJS_ARCH` environment variable to keep or delete cached binaries. Defaults to `true`.
56
-
57
-
### Specify ffmpeg flag:
58
-
59
-
Set `nwjs_ffmpeg` in `.npmrc` or `NWJS_ARCH` environment variable to toggle downloading [community FFmpeg binaries](https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt). Defaults to `false`.
60
-
61
-
### Specify Native Addon flag:
62
-
63
-
Set `nwjs_native_addon` in `.npmrc` or `NWJS_NATIVE_ADDON` environment variable to toggle downloading NW.js Node headers. Defaults to `false`.
64
-
65
-
### Specify download URL:
66
-
67
-
Set `nwjs_urlbase` in `.npmrc`or `NWJS_URLBASE` environment variable. Defaults to `https://dl.nwjs.io`. The file system (`file://`) is also supported (for example, `file:///home/localghost/local_mirror`).
68
-
69
-
### Specify unref flag
70
-
71
-
Set `nwjs_unref` in `.npmrc` or `NWJS_UNREF` environment variable. Default to `false`. This is useful if you're using `nw` package to call the executable and want to prevent zombie processes eating up memory.
33
+
For more options, see the Options table below.
72
34
73
35
## Usage
74
36
@@ -82,7 +44,7 @@ Add a script in your `package.json`:
82
44
}
83
45
```
84
46
85
-
Executing `npm start` runs the NW.js app. Omitting the file path makes NW.js check for valid project in current working directory. You can also call `nw` directly from `node_modules/.bin/nw`.
47
+
Executing `npm start` runs the NW.js app. Omitting the file path makes NW.js check for valid project in current working directory. You can also call `nw` directly from `./node_modules/.bin/nw`.
| cache |`boolean`|`true`| If true the existing cache is used. Otherwise it removes and redownloads it. |`npm install --save-dev --nwjs-cache=true nw`|`nwjs_cache=true`|`NWJS_CACHE=true`|`get({ cache: true })`|
88
+
| ffmpeg |`boolean`|`false`| If true the chromium ffmpeg is replaced by [community version](https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt) with proprietary codecs. |`npm install --save-dev --nwjs-ffmpeg=true nw`|`nwjs_ffmpeg=true`|`NWJS_FFMPEG=true`|`get({ ffmpeg: true })`|
| unref |`boolean`|`false`|[Prevent the parent process from waiting for a given subprocess](https://nodejs.org/api/child_process.html#subprocessunref). This is useful if you're using `nw` package to call the executable and want to prevent zombie processes eating up memory. |`npm install --save-dev --nwjs-unref=true nw`|`nwjs_unref=true`|`NWJS_UNREF=true`|`get({ unref: true })`|
91
+
shaSum | `boolean` | `true` | If true, then shasums are verified. Otherwise, it is ignored. | `npm install --save-dev --nwjs-shasum=true nw` | `nwjs_shasum=true` | `NWJS_SHASUM=true` | `get({ shaSum: true })` |
92
+
93
+
> Note: While using the CLI interface, /path/to/project refers to options.srcDir in the JavaScript API or JSON object.
0 commit comments