Skip to content

Commit fc9af7c

Browse files
authored
fix(cli): cli capitalisation (#3539)
1 parent d3d47b2 commit fc9af7c

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

packages/api/cli/src/electron-forge-import.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import workingDir from './util/working-dir';
1010
(async () => {
1111
let dir = process.cwd();
1212
program
13-
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version)
13+
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version, '-V, --version', 'Output the current version')
14+
.helpOption('-h, --help', 'Output usage information')
1415
.arguments('[name]')
1516
.action((name) => {
1617
dir = workingDir(dir, name, false);

packages/api/cli/src/electron-forge-init.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ import workingDir from './util/working-dir';
1010
(async () => {
1111
let dir = process.cwd();
1212
program
13-
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version)
13+
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version, '-V, --version', 'Output the current version')
1414
.arguments('[name]')
1515
.option('-t, --template [name]', 'Name of the Forge template to use')
1616
.option('-c, --copy-ci-files', 'Whether to copy the templated CI files (defaults to false)', false)
1717
.option('-f, --force', 'Whether to overwrite an existing directory (defaults to false)', false)
18+
.helpOption('-h, --help', 'Output usage information')
1819
.action((name) => {
1920
dir = workingDir(dir, name, false);
2021
})

packages/api/cli/src/electron-forge-make.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ import workingDir from './util/working-dir';
1111
export async function getMakeOptions(): Promise<MakeOptions> {
1212
let dir = process.cwd();
1313
program
14-
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version)
14+
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version, '-V, --version', 'Output the current version')
1515
.arguments('[cwd]')
1616
.option('--skip-package', 'Assume the app is already packaged')
1717
.option('-a, --arch [arch]', 'Target architecture')
1818
.option('-p, --platform [platform]', 'Target build platform')
1919
.option('--targets [targets]', 'Override your make targets for this run')
20+
.helpOption('-h, --help', 'Output usage information')
2021
.allowUnknownOption(true)
2122
.action((cwd) => {
2223
dir = workingDir(dir, cwd);

packages/api/cli/src/electron-forge-package.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ import workingDir from './util/working-dir';
1111
(async () => {
1212
let dir: string = process.cwd();
1313
program
14-
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version)
14+
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version, '-V, --version', 'Output the current version')
1515
.arguments('[cwd]')
1616
.option('-a, --arch [arch]', 'Target architecture')
1717
.option('-p, --platform [platform]', 'Target build platform')
18+
.helpOption('-h, --help', 'Output usage information')
1819
.action((cwd) => {
1920
dir = workingDir(dir, cwd);
2021
})

packages/api/cli/src/electron-forge-publish.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ import workingDir from './util/working-dir';
1212
(async () => {
1313
let dir = process.cwd();
1414
program
15-
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version)
15+
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version, '-V, --version', 'Output the current version')
1616
.arguments('[cwd]')
1717
.option('--target [target[,target...]]', 'The comma-separated deployment targets, defaults to "github"')
1818
.option('--dry-run', "Triggers a publish dry run which saves state and doesn't upload anything")
1919
.option('--from-dry-run', 'Attempts to publish artifacts from the last saved dry run')
20+
.helpOption('-h, --help', 'Output usage information')
2021
.allowUnknownOption(true)
2122
.action((cwd) => {
2223
dir = workingDir(dir, cwd);

packages/api/cli/src/electron-forge-start.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ import workingDir from './util/working-dir';
2020

2121
let dir = process.cwd();
2222
program
23-
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version)
23+
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version, '-V, --version', 'Output the current version')
2424
.arguments('[cwd]')
2525
.option('-p, --app-path <path>', "Override the path to the Electron app to launch (defaults to '.')")
2626
.option('-l, --enable-logging', 'Enable advanced logging. This will log internal Electron things')
2727
.option('-n, --run-as-node', 'Run the Electron app as a Node.JS script')
2828
.option('--vscode', 'Used to enable arg transformation for debugging Electron through VSCode. Do not use yourself.')
2929
.option('-i, --inspect-electron', 'Triggers inspect mode on Electron to allow debugging the main process. Electron >1.7 only')
3030
.option('--inspect-brk-electron', 'Triggers inspect-brk mode on Electron to allow debugging the main process. Electron >1.7 only')
31+
.helpOption('-h, --help', 'Output usage information')
3132
.action((cwd) => {
3233
dir = workingDir(dir, cwd);
3334
})

packages/api/cli/src/electron-forge.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ program.executeSubCommand = (argv: string[], args: string[], unknown: string[])
3030
};
3131

3232
program
33-
.version(metadata.version)
33+
.version(metadata.version, '-V, --version', 'Output the current version')
3434
.option('--verbose', 'Enables verbose mode')
35+
.helpOption('-h, --help', 'Output usage information')
3536
.command('init', 'Initialize a new Electron application')
3637
.command('import', 'Attempts to navigate you through the process of importing an existing project to "electron-forge"')
3738
.command('start', 'Start the current Electron application in development mode')

0 commit comments

Comments
 (0)