diff --git a/src/cli.js b/src/cli.js index d478f16ef..b39726017 100755 --- a/src/cli.js +++ b/src/cli.js @@ -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", @@ -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", @@ -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(); diff --git a/src/index.js b/src/index.js index ecbea59a6..b468153cf 100644 --- a/src/index.js +++ b/src/index.js @@ -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. */ @@ -35,7 +35,7 @@ import util from "./util.js"; * * @async * @function - * + * * @param {Options} options Options * @return {Promise} */