mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
test(webui): guard tailwind @source against missing perfect-design components
Add a spec that maps every component imported from perfect-design, and every directory it imports in turn, to an @source entry in main.css. Extend the bundle gate spec to check that utilities unique to recently added components appear in the built CSS.
This commit is contained in:
@@ -9,6 +9,13 @@ export const DIST = fileURLToPath(new URL('../dist/assets', import.meta.url))
|
||||
|
||||
export const hasDist = () => existsSync(DIST)
|
||||
|
||||
export function readCss(dir = DIST) {
|
||||
return readdirSync(dir)
|
||||
.filter((f) => f.endsWith('.css'))
|
||||
.map((f) => readFileSync(join(dir, f), 'utf8'))
|
||||
.join('\n')
|
||||
}
|
||||
|
||||
export function totalGzip(dir = DIST) {
|
||||
return measure(dir).reduce((n, r) => n + r.gzip, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user