Skip to content

Commit

Permalink
Change help message
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixinova committed Aug 25, 2024
1 parent 2e6c907 commit 21700ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Added basic message when no arguments are given.
- Changed output of `getVersions` to replace '`.x`' with the actual game version.
- Changed CLI output of `--list` to present the versions in prose instead of JSON.
- Changed help message.

## 1.3.16
- Updated resource pack format to `36`.
Expand Down
9 changes: 4 additions & 5 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ const VERSION = require('../package.json').version

const indent = (n: number): string => ' '.repeat(n * 4)
const log = function (arg: string, desc: string[], example: string): void {
console.log(`\n${indent(2)}pack-format ${arg}`)
console.log(`\n${indent(1)}pack-format ${arg}`)
for (let i in desc)
console.log(indent(3) + desc[i])
console.log(indent(2) + desc[i])
console.log(`${indent(3)}Example: ${example}`)
}

Expand All @@ -24,20 +24,19 @@ const ver = args._[0]

// Print the help message
if (args.help) {
console.log(`\n${indent(1)}pack-format arguments:`)
log(
'<version>',
['Retrieve the resource and data pack formats of any Minecraft version.'],
'pack-format 1.16',
)
log(
'(--data|-d) <version>',
['Retrieve the data pack format in particular when applicable.'],
['Retrieve the data pack format only of the version.'],
'pack-format --data 20w45a',
)
log(
'(--resource|-r) <version>',
['Retrieve the resource pack format in particular when applicable.'],
['Retrieve the resource pack format only of the version.'],
'pack-format --resource 20w45a',
)
log(
Expand Down

0 comments on commit 21700ca

Please sign in to comment.