Skip to content

Commit 896a260

Browse files
committed
feat: add file paths to help
1 parent ffaa85b commit 896a260

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

git-consistent

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ const setOptions = (program, definitions, terms) => {
5858
}
5959
}
6060

61+
const customHelp = (program, templateFilePath, definitionsFilePath) => {
62+
program.on('--help', () => {
63+
console.log('')
64+
console.log('')
65+
console.log(' File Paths:')
66+
console.log('')
67+
console.log(` ${templateFileName}:\t ${templateFilePath}`)
68+
console.log(` ${definitionsFileName}: \t ${definitionsFilePath}`)
69+
})
70+
}
71+
6172
//
6273
// Main
6374
//
@@ -86,6 +97,8 @@ try {
8697
const definitions = loadDefinitions(definitionsFilePath)
8798
const terms = _.keys(definitions)
8899

100+
customHelp(program, templateFilePath, definitionsFilePath)
101+
89102
setOptions(program, definitions, terms)
90103
.parse(process.argv)
91104

0 commit comments

Comments
 (0)