forked from electron-userland/electron-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
73 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,8 @@ | ||
#! /usr/bin/env node | ||
|
||
// import { commonTargets } from "./platformPackager" | ||
import { build, CliOptions } from "./builder" | ||
import { printErrorAndExit } from "./promise" | ||
import { underline } from "chalk" | ||
import yargs = require("yargs") | ||
import { createYargs } from "./cliOptions" | ||
|
||
//noinspection JSUnusedLocalSymbols | ||
const __awaiter = require("./awaiter") | ||
|
||
export function createYargs(): any { | ||
return yargs | ||
.version() | ||
.option("osx", { | ||
alias: "o", | ||
describe: "Build for OS X", | ||
type: "array", | ||
}) | ||
.option("linux", { | ||
alias: "l", | ||
describe: "Build for Linux", | ||
type: "array", | ||
}) | ||
.option("win", { | ||
alias: ["w", "windows"], | ||
describe: "Build for Windows", | ||
type: "array", | ||
}) | ||
.option("x64", { | ||
describe: "Build for x64", | ||
type: "boolean", | ||
}) | ||
.option("ia32", { | ||
describe: "Build for ia32", | ||
type: "boolean", | ||
}) | ||
// .option("target", { | ||
// alias: "t", | ||
// describe: "Target package types", | ||
// choices: commonTargets, | ||
// }) | ||
.option("publish", { | ||
alias: "p", | ||
describe: `Publish artifacts (to GitHub Releases), see ${underline("https://goo.gl/WMlr4n")}`, | ||
choices: ["onTag", "onTagOrDraft", "always", "never"], | ||
}) | ||
.option("platform", { | ||
choices: ["osx", "win", "linux", "darwin", "win32", "all"], | ||
}) | ||
.option("arch", { | ||
choices: ["ia32", "x64", "all"], | ||
}) | ||
.option("npmRebuild", { | ||
describe: "Runs npm rebuild before starting to package the app.", | ||
default: true, | ||
type: "boolean", | ||
}) | ||
.strict() | ||
.help() | ||
.epilog(`Project home: ${underline("https://github.com/electron-userland/electron-builder")}`) | ||
} | ||
|
||
if (!module.parent) { | ||
build(<CliOptions>(createYargs().argv)) | ||
.catch(printErrorAndExit) | ||
} | ||
build(<CliOptions>(createYargs().argv)) | ||
.catch(printErrorAndExit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { underline } from "chalk" | ||
import yargs = require("yargs") | ||
|
||
export function createYargs(): any { | ||
return yargs | ||
.version() | ||
.option("osx", { | ||
alias: "o", | ||
describe: "Build for OS X", | ||
type: "array", | ||
}) | ||
.option("linux", { | ||
alias: "l", | ||
describe: "Build for Linux", | ||
type: "array", | ||
}) | ||
.option("win", { | ||
alias: ["w", "windows"], | ||
describe: "Build for Windows", | ||
type: "array", | ||
}) | ||
.option("x64", { | ||
describe: "Build for x64", | ||
type: "boolean", | ||
}) | ||
.option("ia32", { | ||
describe: "Build for ia32", | ||
type: "boolean", | ||
}) | ||
// .option("target", { | ||
// alias: "t", | ||
// describe: "Target package types", | ||
// choices: commonTargets, | ||
// }) | ||
.option("publish", { | ||
alias: "p", | ||
describe: `Publish artifacts (to GitHub Releases), see ${underline("https://goo.gl/WMlr4n")}`, | ||
choices: ["onTag", "onTagOrDraft", "always", "never"], | ||
}) | ||
.option("platform", { | ||
choices: ["osx", "win", "linux", "darwin", "win32", "all"], | ||
}) | ||
.option("arch", { | ||
choices: ["ia32", "x64", "all"], | ||
}) | ||
.strict() | ||
.help() | ||
.epilog(`Project home: ${underline("https://github.com/electron-userland/electron-builder")}`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters