Skip to content

Commit fdd90eb

Browse files
committed
cleaner output
1 parent 88b1547 commit fdd90eb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

script/check-imports

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ globby('modules/primer-*')
3131
})
3232
.then(modules => {
3333
console.log('⏱ checking %d modules...', modules.length)
34+
const maxNameLength = modules.reduce((len, {name}) => {
35+
return Math.max(len, name.length)
36+
}, 0)
3437
const map = new Map()
3538
const tasks = []
3639
modules.forEach(mod => map.set(mod.name, mod))
@@ -40,8 +43,9 @@ globby('modules/primer-*')
4043
tasks.push(
4144
parseImports(`${mod.path}/index.scss`)
4245
.then(imports => {
43-
console.warn('📦 %s: %d dependencies, %d imports',
44-
mod.name, deps.length, imports.length)
46+
console.warn('📦 %s: %s%d dependencies, %d import(s)',
47+
mod.name, ' '.repeat(maxNameLength - mod.name.length),
48+
deps.length, imports.length)
4549
imports.forEach(imported => {
4650
if (!deps.includes(imported)) {
4751
throw new Error(

0 commit comments

Comments
 (0)