Files
CollabTable/SharedCode/scripts/build-root-styles.mjs
T
Gabriel20xx 6eb8f4ad60
Docker / Docker Build & Push (push) Failing after 1m19s
Lint / Lint (push) Successful in 15s
Tests / Go backend (push) Successful in 19s
Tests / Dashboard checks (push) Successful in 18s
Vendor SharedCode locally
2026-08-06 15:52:56 +02:00

16 lines
514 B
JavaScript

import { readFile, writeFile } from 'node:fs/promises';
const source = await readFile(new URL('../packages/web-ui/dist/styles.css', import.meta.url), 'utf8');
const tokenImport = "@import '@gabriel20xx/design-tokens/theme.css';";
const componentStyles = source
.split(/\r?\n/)
.filter((line) => line.trim() !== tokenImport)
.join('\n')
.trimStart();
await writeFile(
new URL('../shared-styles.css', import.meta.url),
`@import './packages/design-tokens/theme.css';\n\n${componentStyles}`,
'utf8'
);