mirror of
https://github.com/ivuorinen/base-configs.git
synced 2026-02-18 15:49:32 +00:00
18 lines
570 B
JavaScript
18 lines
570 B
JavaScript
'use strict'
|
|
|
|
const configurationPaths = require('../lib/configuration-paths')
|
|
|
|
const configItems = configurationPaths('[module name]')
|
|
const longestLine = configItems.reduce((a, b) => (a.length > b.length ? a : b)).length
|
|
|
|
const mdTable = configItems.map(file => {
|
|
const diff = longestLine - file.length
|
|
return `| ${file}${' '.repeat(diff)} |`
|
|
})
|
|
|
|
const header = 'Searched configuration files'
|
|
console.log('| ' + header + ' '.repeat(longestLine - header.length) + ' |')
|
|
console.log('| ' + '-'.repeat(longestLine) + ' |')
|
|
|
|
mdTable.forEach(line => console.log(line))
|