Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
keremciu committed Apr 16, 2021
1 parent 921adb7 commit 3d9c638
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ easy CLI for ADR docs
[![License](https://img.shields.io/npm/l/adr-tool.svg)](https://github.com/keremciu/adr-tool/blob/main/package.json)

<!-- toc -->
* [Demo](#demo)
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
Expand Down Expand Up @@ -51,16 +52,16 @@ ARGUMENTS
TITLE title of the decision
OPTIONS
-h, --help show CLI help
-t, --ticket=ticket technical ticket
--status=accepted|deprecated|superseeded
-h, --help show CLI help
-t, --ticket=ticket technical ticket
--status=accepted|deprecated|superseded
EXAMPLE
$ adr-tool create Use ADR Tool
a decision created on ./docs/adr/0000-use-adr-tool.md
```

_See code: [src/commands/create.ts](https://github.com/keremciu/adr-tool/blob/v0.1.0/src/commands/create.ts)_
_See code: [src/commands/create.ts](https://github.com/keremciu/adr-tool/blob/v0.1.1/src/commands/create.ts)_

## `adr-tool help [COMMAND]`

Expand Down Expand Up @@ -95,7 +96,7 @@ EXAMPLE
./docs/adr folder is created!
```

_See code: [src/commands/init.ts](https://github.com/keremciu/adr-tool/blob/v0.1.0/src/commands/init.ts)_
_See code: [src/commands/init.ts](https://github.com/keremciu/adr-tool/blob/v0.1.1/src/commands/init.ts)_

## `adr-tool toc`

Expand All @@ -113,5 +114,5 @@ EXAMPLE
./docs/adr/README.md file is created!
```

_See code: [src/commands/toc.ts](https://github.com/keremciu/adr-tool/blob/v0.1.0/src/commands/toc.ts)_
_See code: [src/commands/toc.ts](https://github.com/keremciu/adr-tool/blob/v0.1.1/src/commands/toc.ts)_
<!-- commandsstop -->
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "adr-tool",
"description": "easy CLI for ADR docs",
"version": "0.1.0",
"version": "0.1.1",
"author": "Kerem Sevencan @keremciu",
"bin": {
"adr-tool": "./bin/run"
Expand Down
10 changes: 5 additions & 5 deletions src/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function getLatestIndex(): number {
return decisionFiles.length
}

const statusOptions = ['accepted', 'deprecated', 'superseeded']
const statusOptions = ['accepted', 'deprecated', 'superseded']

export default class Create extends Command {
static description = 'create a new decision and log it into docs/adr/README.md file'
Expand Down Expand Up @@ -88,14 +88,14 @@ a decision created on ./docs/adr/0000-use-adr-tool.md
choices: statusOptions.map(s => ({name: s})),
}])

if (statusresponses.status === 'superseeded') {
const superseeded: any = await inquirer.prompt([{
if (statusresponses.status === 'superseded') {
const superseded: any = await inquirer.prompt([{
name: 'ticket',
message: 'select superseeded decision',
message: 'select superseded decision',
type: 'list',
choices: getDecisions().map((filename: string) => ({name: filename})),
}])
status = `superseded by [${superseeded.ticket}](${superseeded.ticket})`
status = `superseded by [${superseded.ticket}](${superseded.ticket})`
} else {
status = statusresponses.status
}
Expand Down

0 comments on commit 3d9c638

Please sign in to comment.