Skip to content

Improve syntax coloration #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ Of course, commandpost can also be used from an ordinary JavaScript program. :+1

## Installation

```
```bash
$ npm install --save commandpost
```

## How to Use

### Basic Usage

```sh
$ cat cli.ts
```ts
// cli.ts
import * as commandpost from "commandpost";

let root = commandpost
Expand All @@ -40,7 +40,9 @@ commandpost
}
process.exit(1);
});
```

```bash
$ node cli.js --help
Usage: dinner [options] [--] <food>

Expand All @@ -65,7 +67,7 @@ commandpost can automatically generate help and command usage messages based on

### Options

```sh
```ts
// shorthand & formal option with a required parameter. value is converted to string[].
cmd.option("-c, --config <configFile>", "Read setting from specified config file path");

Expand All @@ -83,7 +85,7 @@ If you want to handle unknown options, you can use the `.allowUnknownOption` met

### Arguments

```sh
```ts
// required argument
commandpost.create<{}, { food: string; }>("dinner <food>");

Expand Down