Skip to content

Commit

Permalink
fix(cli): add missing options managedManifest and nodeAddon (#1084)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushmanchhabra authored May 12, 2024
1 parent a221783 commit f6ced81
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
41 changes: 25 additions & 16 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ const cli = yargs(yargs_helpers.hideBin(process.argv))
description: "NW.js supported architecture",
choices: ["ia32", "x64", "arm64"]
})
.option("outDir", {
type: "string",
description: "NW.js build artifacts",
})
.option("cacheDir", {
type: "string",
description: "Cache NW.js binaries",
})
.option("downloadUrl", {
type: "string",
description: "NW.js download server",
Expand All @@ -50,9 +42,13 @@ const cli = yargs(yargs_helpers.hideBin(process.argv))
type: "string",
description: "NW.js version info",
})
.option("glob", {
type: "boolean",
description: "Flag to enable/disable globbing",
.option("cacheDir", {
type: "string",
description: "Cache NW.js binaries",
})
.option("outDir", {
type: "string",
description: "NW.js build artifacts",
})
.option("app", {
type: "object",
Expand All @@ -62,20 +58,33 @@ const cli = yargs(yargs_helpers.hideBin(process.argv))
type: "boolean",
description: "Flag to enable/disable caching",
})
.option("zip", {
type: "string",
description: "Flag to enable/disable compression",
choices: ["zip", "tar", "tgz"]
})
.option("ffmpeg", {
type: "boolean",
description: "Flag to enable/disable downloading community ffmpeg",
})
.option("glob", {
type: "boolean",
description: "Flag to enable/disable globbing",
})
.option("logLevel", {
type: "string",
description: "Specify log level",
choices: ["error", "warn", "info", "debug"]
})
.option("zip", {
type: "string",
description: "Flag to enable/disable compression",
choices: ["zip", "tar", "tgz"]
})
.option("managedManifest", {
type: "string",
description: "Managed manifest mode",
})
.option("nodeAddon", {
type: "string",
description: "Download NW.js Node headers",
choices: [false, "gyp"]
})
.strictOptions()
.parse();

Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import util from "./util.js";
* @property {"./cache" | string} [cacheDir="./cache"] Directory to cache NW binaries
* @property {"./" | string} [srcDir="./"] File paths to application code
* @property {"./out" | string} [outDir="./out"] Directory to store build artifacts
* @property {boolean | string | object} [managedManifest = false] Managed manifest mode
* @property {false | "gyp"} [nodeAddon = false] Rebuild Node native addons
* @property {object} app Refer to Linux/Windows Specific Options under Getting Started in the docs
* @property {boolean} [cache=true] If true the existing cache is used. Otherwise it removes and redownloads it.
* @property {boolean} [ffmpeg=false] If true the chromium ffmpeg is replaced by community version
* @property {boolean} [glob=true] If true file globbing is enabled when parsing srcDir.
* @property {"error" | "warn" | "info" | "debug"} [logLevel="info"] Specify level of logging.
* @property {"error" | "warn" | "info" | "debug"} [logLevel="info"] Specify level of logging.
* @property {boolean | "zip" | "tar" | "tgz"} [zip=false] If true, "zip", "tar" or "tgz" the outDir directory is compressed.
* @property {boolean | string | object} [managedManifest = false] Managed manifest mode
* @property {false | "gyp"} [nodeAddon = false] Rebuild Node native addons
* @property {boolean} [cli=false] If true the CLI is used to parse options. This option is used internally.
*/

Expand All @@ -35,7 +35,7 @@ import util from "./util.js";
*
* @async
* @function
*
*
* @param {Options} options Options
* @return {Promise<void>}
*/
Expand Down

0 comments on commit f6ced81

Please sign in to comment.