Skip to content

Commit

Permalink
feat: add file paths to help
Browse files Browse the repository at this point in the history
  • Loading branch information
isuke committed Nov 11, 2018
1 parent ffaa85b commit 896a260
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions git-consistent
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ const setOptions = (program, definitions, terms) => {
}
}

const customHelp = (program, templateFilePath, definitionsFilePath) => {
program.on('--help', () => {
console.log('')
console.log('')
console.log(' File Paths:')
console.log('')
console.log(` ${templateFileName}:\t ${templateFilePath}`)
console.log(` ${definitionsFileName}: \t ${definitionsFilePath}`)
})
}

//
// Main
//
Expand Down Expand Up @@ -86,6 +97,8 @@ try {
const definitions = loadDefinitions(definitionsFilePath)
const terms = _.keys(definitions)

customHelp(program, templateFilePath, definitionsFilePath)

setOptions(program, definitions, terms)
.parse(process.argv)

Expand Down

0 comments on commit 896a260

Please sign in to comment.