diff --git a/README.md b/README.md index c01d28b..d8b3e80 100644 --- a/README.md +++ b/README.md @@ -13,16 +13,15 @@ easy CLI for ADR docs * [Commands](#commands) # Usage + +You can install it globally (`npm install -g adr-tool`) or use it with [npx](https://docs.npmjs.com/cli/v7/commands/npx) + ```sh-session -$ npm install -g adr-tool -$ adr-tool COMMAND -running command... -$ adr-tool (-v|--version|version) -adr-tool/0.0.5 darwin-x64 node-v14.16.0 -$ adr-tool --help [COMMAND] +$ npx adr-tool init +./docs/adr folder is created! USAGE - $ adr-tool COMMAND + $ npx adr-tool create 'Use Markdown Architectural Decision Records' ... ``` diff --git a/src/commands/create.ts b/src/commands/create.ts index b46cfad..53f65f6 100644 --- a/src/commands/create.ts +++ b/src/commands/create.ts @@ -82,9 +82,7 @@ a decision created on ./docs/adr/0001-use-adr-tool.md const tocFileRaw = fs.readFileSync(tocFilePath, 'utf8') const tocFileArray = tocFileRaw.split('\n') - const tocString = `* [ADR-${fileIndex}](${filename}.md) - ${args.title}` - const tocStopIndex = tocFileArray.indexOf('') tocFileArray.splice(tocStopIndex - 1, 0, tocString)