From 54ac796fe0a19f94372b3b6faacc680f8a096b24 Mon Sep 17 00:00:00 2001 From: develar Date: Mon, 12 Jun 2017 18:54:33 +0200 Subject: [PATCH] feat: electron-builder bin executable --- packages/electron-builder/package.json | 9 +++++++-- packages/electron-builder/src/builder.ts | 16 ++++++++-------- .../src/cli/{cliOptions.ts => cli.ts} | 0 3 files changed, 15 insertions(+), 10 deletions(-) rename packages/electron-builder/src/cli/{cliOptions.ts => cli.ts} (100%) diff --git a/packages/electron-builder/package.json b/packages/electron-builder/package.json index d9afd25c3b8..7cb8503ea74 100644 --- a/packages/electron-builder/package.json +++ b/packages/electron-builder/package.json @@ -11,7 +11,9 @@ "certs/root_certs.keychain" ], "bin": { - "build": "./out/cli/cliOptions.js", + "electron-builder": "./out/cli/cli.js", + "elb": "./out/cli/cli.js", + "build": "./out/cli/cli.js", "install-app-deps": "./out/cli/install-app-deps.js", "node-gyp-rebuild": "./out/cli/node-gyp-rebuild.js" }, @@ -30,6 +32,7 @@ "nsis", "app", "dmg", + "pkg", "msi", "exe", "setup", @@ -37,7 +40,9 @@ "OS X", "MacOS", "Mac", - "appx" + "appx", + "snap", + "portable" ], "author": "Vladimir Krivosheev", "contributors": ["Stefan Judis"], diff --git a/packages/electron-builder/src/builder.ts b/packages/electron-builder/src/builder.ts index d467698eac5..9986ba52f84 100644 --- a/packages/electron-builder/src/builder.ts +++ b/packages/electron-builder/src/builder.ts @@ -268,7 +268,7 @@ export function configureBuildCommand(yargs: yargs.Yargs): yargs.Yargs { group: publishGroup, alias: "p", describe: `Publish artifacts (to GitHub Releases), see ${underline("https://goo.gl/WMlr4n")}`, - choices: ["onTag", "onTagOrDraft", "always", "never"], + choices: ["onTag", "onTagOrDraft", "always", "never", undefined], }) .option("draft", { group: publishGroup, @@ -285,12 +285,12 @@ export function configureBuildCommand(yargs: yargs.Yargs): yargs.Yargs { .option("platform", { group: deprecated, describe: "The target platform (preferred to use --mac, --win or --linux)", - choices: ["mac", "win", "linux", "darwin", "win32", "all"], + choices: ["mac", "win", "linux", "darwin", "win32", "all", undefined], }) .option("arch", { group: deprecated, describe: "The target arch (preferred to use --x64 or --ia32)", - choices: ["ia32", "x64", "all"], + choices: ["ia32", "x64", "all", undefined], }) .option("extraMetadata", { alias: ["em"], @@ -313,11 +313,11 @@ export function configureBuildCommand(yargs: yargs.Yargs): yargs.Yargs { describe: "The path to an electron-builder config. Defaults to `electron-builder.yml` (or `json`, or `json5`), see " + underline("https://goo.gl/YFRJOM"), }) .group(["help", "version"], "Other:") - .example("build -mwl", "build for macOS, Windows and Linux") - .example("build --linux deb tar.xz", "build deb and tar.xz for Linux") - .example("build --win --ia32", "build for Windows ia32") - .example("build --em.foo=bar", "set package.json property `foo` to `bar`") - .example("build --config.nsis.unicode=false", "configure unicode options for NSIS") + .example("electron-builder -mwl", "build for macOS, Windows and Linux") + .example("electron-builder --linux deb tar.xz", "build deb and tar.xz for Linux") + .example("electron-builder --win --ia32", "build for Windows ia32") + .example("electron-builder --em.foo=bar", "set package.json property `foo` to `bar`") + .example("electron-builder --config.nsis.unicode=false", "configure unicode options for NSIS") } /** @private */ diff --git a/packages/electron-builder/src/cli/cliOptions.ts b/packages/electron-builder/src/cli/cli.ts similarity index 100% rename from packages/electron-builder/src/cli/cliOptions.ts rename to packages/electron-builder/src/cli/cli.ts