nw-builder 4.14.0 → 4.14.1
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/package.json +1 -1
- package/src/cli.js +5 -3
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -25,10 +25,12 @@ program
|
|
|
25
25
|
.option('--shaSum <string>', 'Enable/disable shasum', true)
|
|
26
26
|
.option('--zip <string>', 'Enable/disable compression', false)
|
|
27
27
|
.option('--managedManifest <string>', 'Managed manifest mode', false)
|
|
28
|
-
.option('--nodeAddon <boolean>', 'Download NW.js Node headers', false)
|
|
28
|
+
.option('--nodeAddon <boolean>', 'Download NW.js Node headers', false)
|
|
29
|
+
.allowUnknownOption(true)
|
|
30
|
+
.allowExcessArguments(true);
|
|
29
31
|
|
|
30
32
|
// Handle unknown --app.* arguments
|
|
31
|
-
const unknownArgs = program.
|
|
33
|
+
const unknownArgs = program.parse(process.argv).args;
|
|
32
34
|
const appConfig = {};
|
|
33
35
|
for (const arg of unknownArgs) {
|
|
34
36
|
const match = arg.match(/^--app\.([^.=]+)=(.*)$/);
|
|
@@ -42,7 +44,7 @@ for (const arg of unknownArgs) {
|
|
|
42
44
|
const opts = {
|
|
43
45
|
...program.opts(),
|
|
44
46
|
app: appConfig,
|
|
45
|
-
srcDir: program.args
|
|
47
|
+
srcDir: program.args.find((arg) => !arg.startsWith('--app')),
|
|
46
48
|
cli: true,
|
|
47
49
|
};
|
|
48
50
|
|