nw-builder 3.8.6 → 3.8.8
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 +33 -0
- package/bin/nwbuild.cjs +1 -21
- package/lib/index.cjs +774 -870
- package/lib/utils.cjs +4 -3
- package/package.json +52 -69
- package/src/constants/Options.js +1 -1
- package/src/get.js +206 -0
- package/src/index.js +13 -4
- package/src/log.js +32 -0
- package/src/run.js +78 -0
- package/src/util.js +275 -0
- package/src/utilities/checkCache.js +3 -3
- package/src/utilities/detectCurrentPlatform.js +3 -3
- package/.editorconfig +0 -17
- package/.github/CHANGELOG.md +0 -209
- package/.github/CODE_OF_CONDUCT.md +0 -55
- package/.github/ISSUE_TEMPLATE.md +0 -17
- package/.github/LICENSE +0 -20
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -5
- package/.github/dependabot.yml +0 -17
- package/.github/workflows/cd.yml +0 -19
- package/.github/workflows/ci.yml +0 -30
- package/dist/index.cjs +0 -6
- package/docs/api.md +0 -5
- package/docs/getting-started.md +0 -155
- package/docs/index.md +0 -12
- package/src/utilities/checkPkgOptions.js +0 -28
- package/src/utilities/parseOptions.js +0 -10
- package/test/demo/icon.icns +0 -0
- package/test/demo/icon.ico +0 -0
- package/test/demo/index.cjs +0 -8
- package/test/demo/index.html +0 -10
- package/test/demo/package.json +0 -25
- package/test/expected/README.md +0 -7
- package/test/expected/merged +0 -1
- package/test/expected/oneOveriddenRestNot/README.md +0 -7
- package/test/expected/oneOveriddenRestNot/osx32.json +0 -9
- package/test/expected/oneOveriddenRestNot/osx64.json +0 -9
- package/test/expected/osx-plist/1.plist +0 -47
- package/test/expected/osx-plist/2.plist +0 -40
- package/test/expected/osx-plist/README.md +0 -7
- package/test/expected/platformOverrides/README.md +0 -7
- package/test/expected/platformOverrides/linux32.json +0 -13
- package/test/expected/platformOverrides/linux64.json +0 -9
- package/test/expected/platformOverrides/osx32.json +0 -12
- package/test/expected/platformOverrides/osx64.json +0 -12
- package/test/expected/platformOverrides/win32.json +0 -12
- package/test/expected/platformOverrides/win64.json +0 -12
- package/test/fixtures/README.md +0 -7
- package/test/fixtures/invalid.json +0 -3
- package/test/fixtures/manifest/README.md +0 -7
- package/test/fixtures/manifest/versions.json +0 -29
- package/test/fixtures/nwapp/README.md +0 -7
- package/test/fixtures/nwapp/images/imagefile.img +0 -1
- package/test/fixtures/nwapp/index.html +0 -13
- package/test/fixtures/nwapp/javascript/bower_packages/simple/package.json +0 -1
- package/test/fixtures/nwapp/javascript/jsfile.js +0 -1
- package/test/fixtures/nwapp/package.json +0 -5
- package/test/fixtures/oneOveriddenRestNot/README.md +0 -7
- package/test/fixtures/oneOveriddenRestNot/package.json +0 -16
- package/test/fixtures/osx-plist/Info.plist +0 -93
- package/test/fixtures/osx-plist/README.md +0 -7
- package/test/fixtures/platformOverrides/README.md +0 -7
- package/test/fixtures/platformOverrides/package.json +0 -72
- package/test/fixtures/test-strip.zip +0 -0
- package/test/fixtures/test.tar.gz +0 -0
- package/test/fixtures/test.zip +0 -0
- package/test/fixtures/testVersions.html +0 -74
- package/test/nwBuilder.cjs +0 -339
- package/test/unit/checkCache.test.js +0 -18
- package/test/unit/checkCacheDir/v0.64.1/linux64/nw1.app +0 -0
- package/test/unit/checkCacheDir/v0.64.1/linux64/nw2.app +0 -0
- package/test/unit/detectCurrentPlatform.test.js +0 -58
- package/test/utils.cjs +0 -312
- package/test/versions.cjs +0 -491
package/README.md
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
# nw-builder
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/nw-builder/v/stable)
|
|
4
|
+
[](https://app.gitter.im/#/room/#nwjs_nw-builder:gitter.im)
|
|
5
|
+
|
|
3
6
|
Build [NW.js](https://github.com/nwjs/nw.js) applications for Mac, Windows and Linux.
|
|
4
7
|
|
|
8
|
+
For version 4, please go to the [corresponding branch](https://github.com/nwutils/nw-builder/tree/main).
|
|
9
|
+
|
|
5
10
|
## Table of Contents
|
|
6
11
|
|
|
7
12
|
- [Installation](https://github.com/nwutils/nw-builder#installation)
|
|
@@ -208,6 +213,34 @@ Default value: `true`
|
|
|
208
213
|
|
|
209
214
|
WINDOWS AND LINUX ONLY: Merge the source file package with the Node Webkit executable.
|
|
210
215
|
|
|
216
|
+
#### options.downloadUrl
|
|
217
|
+
|
|
218
|
+
Type: `string`
|
|
219
|
+
Default value: `https://dl.nwjs.io`
|
|
220
|
+
|
|
221
|
+
Server to download binaries from.
|
|
222
|
+
|
|
223
|
+
#### options.manifestUrl
|
|
224
|
+
|
|
225
|
+
Type: `string`
|
|
226
|
+
Default value: `https://nwjs.io/versions`
|
|
227
|
+
|
|
228
|
+
Server to download binaries from.
|
|
229
|
+
|
|
230
|
+
#### options.quiet
|
|
231
|
+
|
|
232
|
+
Type: `string`
|
|
233
|
+
Default: `"info"`
|
|
234
|
+
|
|
235
|
+
Set the log level. Valid options are `"error"`, `"warn"`, `"info"`, `"debug"` and `"off"`.
|
|
236
|
+
|
|
237
|
+
#### options.useRcedit
|
|
238
|
+
|
|
239
|
+
Type: `Boolean`
|
|
240
|
+
Default: `false`
|
|
241
|
+
|
|
242
|
+
`winresourcer` is used to update Windows executable resources by default. `rcedit` can be used if preferred.
|
|
243
|
+
|
|
211
244
|
### Manifest Options
|
|
212
245
|
|
|
213
246
|
#### platformOverrides
|
package/bin/nwbuild.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const yargs = require("yargs/yargs");
|
|
|
4
4
|
const { hideBin } = require("yargs/helpers");
|
|
5
5
|
|
|
6
6
|
const { nwbuild } = require("../lib/index.cjs");
|
|
7
|
-
const {
|
|
7
|
+
const { detectCurrentPlatform } = require("../dist/index.cjs");
|
|
8
8
|
|
|
9
9
|
const cli = yargs(hideBin(process.argv))
|
|
10
10
|
.version(false)
|
|
@@ -12,130 +12,110 @@ const cli = yargs(hideBin(process.argv))
|
|
|
12
12
|
.option("mode", {
|
|
13
13
|
type: "string",
|
|
14
14
|
description: "Choose between run and build mode",
|
|
15
|
-
default: Options["mode"],
|
|
16
15
|
})
|
|
17
16
|
.option("quiet", {
|
|
18
17
|
type: "string",
|
|
19
18
|
description:
|
|
20
19
|
"Choose your level of logging between error, warn, info, debug and off",
|
|
21
|
-
default: Options["quiet"],
|
|
22
20
|
})
|
|
23
21
|
.option("version", {
|
|
24
22
|
type: "string",
|
|
25
23
|
description: "Version of NW.js you want to use.",
|
|
26
24
|
group: "Run API",
|
|
27
|
-
default: Options["version"],
|
|
28
25
|
})
|
|
29
26
|
.option("flavor", {
|
|
30
27
|
type: "string",
|
|
31
28
|
description:
|
|
32
29
|
"sdk is recommended for development and normal is recommended for production.",
|
|
33
30
|
group: "Run API",
|
|
34
|
-
default: Options["flavor"],
|
|
35
31
|
})
|
|
36
32
|
.option("cacheDir", {
|
|
37
33
|
type: "string",
|
|
38
34
|
description: "Path to NW.js cache",
|
|
39
35
|
group: "Run API",
|
|
40
|
-
default: Options["cacheDir"],
|
|
41
36
|
})
|
|
42
37
|
.option("platforms", {
|
|
43
38
|
type: "array",
|
|
44
39
|
description:
|
|
45
40
|
"Supported platforms are linux32, linux64, osx32, osx64, win32, win64",
|
|
46
41
|
group: "Run API",
|
|
47
|
-
default: detectCurrentPlatform(process),
|
|
48
42
|
})
|
|
49
43
|
.option("appName", {
|
|
50
44
|
type: "string",
|
|
51
45
|
description: "Name of your application",
|
|
52
46
|
group: "Build API",
|
|
53
|
-
default: Options["appName"],
|
|
54
47
|
})
|
|
55
48
|
.option("appVersion", {
|
|
56
49
|
type: "string",
|
|
57
50
|
description: "Version of your application",
|
|
58
51
|
group: "Build API",
|
|
59
|
-
default: Options["appVersion"],
|
|
60
52
|
})
|
|
61
53
|
.option("buildDir", {
|
|
62
54
|
type: "string",
|
|
63
55
|
description: "Path to NW.js build",
|
|
64
56
|
group: "Build API",
|
|
65
|
-
default: Options["buildDir"],
|
|
66
57
|
})
|
|
67
58
|
.option("buildType", {
|
|
68
59
|
type: "string",
|
|
69
60
|
description:
|
|
70
61
|
"default is appName, \nversioned is [appName] -v[appVersion], \ntimestamped is [appName] - [timestamp]",
|
|
71
62
|
group: "Build API",
|
|
72
|
-
default: Options["buildType"],
|
|
73
63
|
})
|
|
74
64
|
.option("forceDownload", {
|
|
75
65
|
type: "boolean",
|
|
76
66
|
description: "Delete all cache and builds and redownload them",
|
|
77
67
|
group: "Build API",
|
|
78
|
-
default: Options["forceDownload"],
|
|
79
68
|
})
|
|
80
69
|
.option("macCredits", {
|
|
81
70
|
type: "string",
|
|
82
71
|
description:
|
|
83
72
|
"The path to your credits.html file. By default it uses the one provided by NW.js",
|
|
84
73
|
group: "Build API",
|
|
85
|
-
default: Options["macCredits"],
|
|
86
74
|
})
|
|
87
75
|
.option("macIcns", {
|
|
88
76
|
type: "string",
|
|
89
77
|
description:
|
|
90
78
|
"The path to your ICNS file. By default it uses the one provided by NW.js",
|
|
91
79
|
group: "Build API",
|
|
92
|
-
default: Options["macIcns"],
|
|
93
80
|
})
|
|
94
81
|
.option("macPlist", {
|
|
95
82
|
type: "string",
|
|
96
83
|
description:
|
|
97
84
|
"The path to your Plist file. By default a Plist file is generated from the package.json",
|
|
98
85
|
group: "Build API",
|
|
99
|
-
default: Options["macPlist"],
|
|
100
86
|
})
|
|
101
87
|
.option("winVersionString", {
|
|
102
88
|
type: "object",
|
|
103
89
|
description: "Descriptors for Windows executable",
|
|
104
90
|
group: "Build API",
|
|
105
|
-
default: Options["winVersionString"],
|
|
106
91
|
})
|
|
107
92
|
.option("winIco", {
|
|
108
93
|
type: "string",
|
|
109
94
|
description:
|
|
110
95
|
"Path to your ICO file. By default it uses the one provided by NW.js",
|
|
111
96
|
group: "Build API",
|
|
112
|
-
default: Options["winIco"],
|
|
113
97
|
})
|
|
114
98
|
.option("useRcedit", {
|
|
115
99
|
type: "string",
|
|
116
100
|
description:
|
|
117
101
|
"If set to true, it allows you to set the Windows icon using rcedit instead of winresourcer",
|
|
118
102
|
group: "Build API",
|
|
119
|
-
default: Options["useRcedit"],
|
|
120
103
|
})
|
|
121
104
|
.option("zip", {
|
|
122
105
|
type: "boolean",
|
|
123
106
|
description: "Zip your NW.js application",
|
|
124
107
|
group: "Package API",
|
|
125
|
-
default: Options["zip"],
|
|
126
108
|
})
|
|
127
109
|
.option("zipOptions", {
|
|
128
110
|
type: "boolean",
|
|
129
111
|
description:
|
|
130
112
|
"Configure the underling zip library parameters, like store or compression ratio",
|
|
131
113
|
group: "Package API",
|
|
132
|
-
default: Options["zipOptions"],
|
|
133
114
|
})
|
|
134
115
|
.option("mergeZip", {
|
|
135
116
|
type: "boolean",
|
|
136
117
|
description: "Merge the source file package with the NW.js executable",
|
|
137
118
|
group: "Package API",
|
|
138
|
-
default: Options["mergeZip"],
|
|
139
119
|
})
|
|
140
120
|
.parse();
|
|
141
121
|
|