chore(docs): better readme

This commit is contained in:
Ismo Vuorinen
2023-10-31 11:22:11 +02:00
parent 33a338c347
commit 1a47cca54c
3 changed files with 95 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
const configurationPaths = require('../lib/configuration-paths')
const configItems = configurationPaths('[module name]')
const configItems = configurationPaths('`[module name]`')
const longestLine = configItems.reduce((a, b) => (a.length > b.length ? a : b)).length
const mdTable = configItems.map(file => {
@@ -10,6 +10,8 @@ const mdTable = configItems.map(file => {
return `| ${file}${' '.repeat(diff)} |`
})
console.log('# Configuration files\n')
const header = 'Searched configuration files'
console.log('| ' + header + ' '.repeat(longestLine - header.length) + ' |')
console.log('| ' + '-'.repeat(longestLine) + ' |')