Skip to content

Commit

Permalink
docs: fix incorrect imports in docs
Browse files Browse the repository at this point in the history
fixes #211
  • Loading branch information
mattallty committed Aug 28, 2023
1 parent 21a067d commit b708e91
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ Of course you can add **multiple arguments** just by chaining them:

```js
#!/usr/bin/env node

const { program } = require("@caporal/core")

program
.argument("<name>", "Name to greet")
.argument("<other-name>", "Another argument")
Expand All @@ -116,7 +118,7 @@ Let's add a way to modify the greeting by adding a `--greeting` option to our pr
```js
#!/usr/bin/env node

const program = require("@caporal/core")
const { program } = require("@caporal/core")

program
.argument("<name>", "Name to greet")
Expand Down Expand Up @@ -144,7 +146,9 @@ short notation like this:

```js
#!/usr/bin/env node

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
Expand Down Expand Up @@ -173,8 +177,7 @@ complex to illustrate **commands**.
```ts
#!/usr/bin/env ts-node

// file: pizza-hit.ts
import program from "@caporal/core"
import { program } from "@caporal/core"

program
// First possible command: "order"
Expand Down

0 comments on commit b708e91

Please sign in to comment.