mirror of
https://github.com/primer/css.git
synced 2024-11-28 13:12:16 +03:00
cleaner output
This commit is contained in:
parent
88b154704a
commit
fdd90eb9e5
@ -31,6 +31,9 @@ globby('modules/primer-*')
|
|||||||
})
|
})
|
||||||
.then(modules => {
|
.then(modules => {
|
||||||
console.log('⏱ checking %d modules...', modules.length)
|
console.log('⏱ checking %d modules...', modules.length)
|
||||||
|
const maxNameLength = modules.reduce((len, {name}) => {
|
||||||
|
return Math.max(len, name.length)
|
||||||
|
}, 0)
|
||||||
const map = new Map()
|
const map = new Map()
|
||||||
const tasks = []
|
const tasks = []
|
||||||
modules.forEach(mod => map.set(mod.name, mod))
|
modules.forEach(mod => map.set(mod.name, mod))
|
||||||
@ -40,8 +43,9 @@ globby('modules/primer-*')
|
|||||||
tasks.push(
|
tasks.push(
|
||||||
parseImports(`${mod.path}/index.scss`)
|
parseImports(`${mod.path}/index.scss`)
|
||||||
.then(imports => {
|
.then(imports => {
|
||||||
console.warn('📦 %s: %d dependencies, %d imports',
|
console.warn('📦 %s: %s%d dependencies, %d import(s)',
|
||||||
mod.name, deps.length, imports.length)
|
mod.name, ' '.repeat(maxNameLength - mod.name.length),
|
||||||
|
deps.length, imports.length)
|
||||||
imports.forEach(imported => {
|
imports.forEach(imported => {
|
||||||
if (!deps.includes(imported)) {
|
if (!deps.includes(imported)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
Loading…
Reference in New Issue
Block a user