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

Commit

Permalink
fix folder path
Browse files Browse the repository at this point in the history
  • Loading branch information
keremciu committed Apr 14, 2021
1 parent b04444a commit 7d86613
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install -g adr-tool
$ adr-tool COMMAND
running command...
$ adr-tool (-v|--version|version)
adr-tool/0.0.0 darwin-x64 node-v14.16.0
adr-tool/0.0.1 darwin-x64 node-v14.16.0
$ adr-tool --help [COMMAND]
USAGE
$ adr-tool COMMAND
Expand Down Expand Up @@ -51,7 +51,7 @@ EXAMPLE
a decision created on ./docs/adr/0001-use-adr-tool.md
```

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

## `adr-tool help [COMMAND]`

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

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

## `adr-tool toc`

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

_See code: [src/commands/toc.ts](https://github.com/keremciu/adr-tool/blob/v0.0.0/src/commands/toc.ts)_
_See code: [src/commands/toc.ts](https://github.com/keremciu/adr-tool/blob/v0.0.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.0.1",
"version": "0.0.2",
"author": "Kerem Sevencan @keremciu",
"bin": {
"adr-tool": "./bin/run"
Expand Down
8 changes: 3 additions & 5 deletions src/commands/init.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
const fs = require('fs')
const path = require('path')

import {Command, flags} from '@oclif/command'
import {error} from '@oclif/errors'

import {adrDir, cliDir} from '../config'
import {adrDir, cliTemplatesPath} from '../config'

const cliTemplates = path.join(cliDir + '/../templates/')
const cliTemplateFile = cliTemplates + 'template.md'
const cliTOCFile = cliTemplates + 'toc.md'
const cliTemplateFile = cliTemplatesPath + 'template.md'
const cliTOCFile = cliTemplatesPath + 'toc.md'

export default class Init extends Command {
static description = 'create docs/adr folder and copies template.md and README.md'
Expand Down
7 changes: 2 additions & 5 deletions src/commands/toc.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
const fs = require('fs')
const path = require('path')

import {Command, flags} from '@oclif/command'
import {error} from '@oclif/errors'

import {adrDir, cliDir} from '../config'
import {adrDir, cliTemplatesPath} from '../config'

const cliTemplates = path.join(cliDir + '/../templates/')

const cliTOCFile = cliTemplates + 'toc.md'
const cliTOCFile = cliTemplatesPath + 'toc.md'

export default class Toc extends Command {
static description = 'create docs/adr/README.md file'
Expand Down
4 changes: 3 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ const fs = require('fs')

export const workDir = process.cwd()
export const adrDir = workDir + '/docs/adr/'
export const cliDir = path.dirname(fs.realpathSync(__filename))

const cliDir = path.dirname(fs.realpathSync(__filename))
export const cliTemplatesPath = path.join(cliDir + '/templates/')

0 comments on commit 7d86613

Please sign in to comment.