nw 0.98.0-sdk-sdk → 0.98.1-sdk
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -55
- package/package.json +2 -2
- package/src/get.js +1 -0
package/README.md
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
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
|
|
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`.
|
|
86
48
|
|
|
87
49
|
## APIs
|
|
88
50
|
|
|
@@ -106,23 +68,29 @@ let path = await findpath('chromedriver', { flavor: 'sdk' });
|
|
|
106
68
|
import { get } from 'nw';
|
|
107
69
|
|
|
108
70
|
await get({
|
|
109
|
-
|
|
71
|
+
version: '0.14.7'
|
|
72
|
+
// other options
|
|
110
73
|
});
|
|
111
74
|
```
|
|
112
75
|
|
|
113
|
-
Options:
|
|
114
|
-
|
|
115
|
-
| Name | Type | Default | Description |
|
|
116
|
-
| ---- | ------- | --------- | ----------- |
|
|
117
|
-
| version | `string \| "latest" \| "stable"` | `"latest"` | Runtime version |
|
|
118
|
-
| flavor | `"normal" \| "sdk"` | `"normal"` | Runtime flavor |
|
|
119
|
-
| platform | `"linux" \| "osx" \| "win"` | | Host platform |
|
|
120
|
-
| arch | `"ia32" \| "x64" \| "arm64"` | | Host architecture |
|
|
121
|
-
| downloadUrl | `"https://dl.nwjs.io" \| "https://npm.taobao.org/mirrors/nwjs" \| https://npmmirror.com/mirrors/nwjs \| "https://github.com/corwin-of-amber/nw.js/releases/"` | `"https://dl.nwjs.io"` | Download server |
|
|
122
|
-
| cacheDir | `string` | `
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
76
|
+
## Options:
|
|
77
|
+
|
|
78
|
+
| Name | Type | Default | Description | CLI Usage | .npmrc Usage | .env Usage | Module Usage |
|
|
79
|
+
| ---- | ------- | --------- | ----------- | --------- | ------------ | ---------- | ------------ |
|
|
80
|
+
| version | `string \| "latest" \| "stable"` | `"latest"` | Runtime version | `npm install --save-dev nw` | `` | `` | `get({ version: "latest" })` |
|
|
81
|
+
| flavor | `"normal" \| "sdk"` | `"normal"` | Runtime flavor | `npm install --save-dev nw@sdk` | `nwjs_build_type=sdk` | `export NWJS_BUILD_TYPE=sdk` | `get({ flavor: "sdk" })` |
|
|
82
|
+
| platform | `"linux" \| "osx" \| "win"` | `<defaults to host platform>` | Host platform | `npm install --save-dev --nwjs-platform nw` | `nwjs_platform=linux` | `NWJS_PLATFORM=linux` | `get({ platform: "linux" })` |
|
|
83
|
+
| arch | `"ia32" \| "x64" \| "arm64"` | `<defaults to architecture platform>` | Host architecture | `npm install --save-dev --nwjs-arch nw` | `nwjs_arch=x64` | `NWJS_ARCH=x64` | `get({ arch: "x64"})` |
|
|
84
|
+
| downloadUrl | `"https://dl.nwjs.io" \| "https://npm.taobao.org/mirrors/nwjs" \| https://npmmirror.com/mirrors/nwjs \| "https://github.com/corwin-of-amber/nw.js/releases/ nw"` | `"https://dl.nwjs.io"` | Download server (https and file system is supported, for eg `file:///home/user/nwjs_cache`) | `npm install --save-dev --nwjs-urlbase=https://dl.nwjs.io` | `nwjs_urlbase=https://dl.nwjs.io` | `NWJS_URLBASE=https://dl.nwjs.io` | `get({ downloadUrl: "https://dl.nwjs.io"})` |
|
|
85
|
+
| cacheDir | `string` | `./node_modules/nw` | Directory to cache NW binaries | `npm install --save-dev --nwjs-cache-dir ./cache nw` | `nwjs_cache_dir=./cache` | `NWJS_CACHE_DIR=./cache` | `get({ cacheDir: "./cache" })` |
|
|
86
|
+
| sirDir | `string` | `.` | File path to NW.js project | `nw .` | `` | `` | `get({ srcDir: "." })` |
|
|
87
|
+
| 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 })` |
|
|
89
|
+
| nodeAddon | `false \| "gyp"` | `false` | Download Node headers | `npm install --save-dev --nwjs-native-addon=true nw` | `nwjs_native_addon=true` | `NWJS_NATIVE_ADDON=true` | `get({ nativeAddon: true })` |
|
|
90
|
+
| 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.
|
|
126
94
|
|
|
127
95
|
## License
|
|
128
96
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nw",
|
|
3
|
-
"version": "0.98.
|
|
3
|
+
"version": "0.98.1-sdk",
|
|
4
4
|
"description": "An installer for NW.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"application"
|
|
51
51
|
],
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@vitest/coverage-v8": "^3.
|
|
53
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
54
54
|
"selenium-webdriver": "^4.30.0",
|
|
55
55
|
"vitest": "^3.0.4"
|
|
56
56
|
}
|