Skip to content

Commit

Permalink
Merge pull request #207 from chriscalo/patch-1
Browse files Browse the repository at this point in the history
fix(guide): Fix typo (greating => greeting)
  • Loading branch information
mattallty authored Aug 26, 2023
2 parents 0281f6f + cc24565 commit 71181eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/hello-with-option-alt.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const { program } = require("@caporal/core")
program
.argument("<name>", "Name to greet")
// we will be able to use either `-g` or `--greeting` in the command line
.option("-g, --greating <word>", "Greating to use", {
.option("-g, --greeting <word>", "Greeting to use", {
default: "Hello",
})
.action(({ logger, args, options }) =>
logger.info("%s, %s!", options.greating, args.name),
logger.info("%s, %s!", options.greeting, args.name),
)

program.run()
Expand Down
4 changes: 2 additions & 2 deletions examples/hello-with-option.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
const program = require("@caporal/core")
program
.argument("<name>", "Name to greet")
.option("--greating <word>", "Greating to use", {
.option("--greeting <word>", "Greeting to use", {
default: "Hello",
})
.action(({ logger, args, options }) => {
logger.info("%s, %s!", options.greating, args.name)
logger.info("%s, %s!", options.greeting, args.name)
})

program.run()
Expand Down

0 comments on commit 71181eb

Please sign in to comment.