Styles reference CSS custom properties from @navikt/ds-tokens. build.mjs copies source stylesheets to dist/.
18 lines
477 B
JavaScript
18 lines
477 B
JavaScript
import { mkdirSync, readdirSync, copyFileSync } from "node:fs";
|
|
import { dirname, join } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const root = dirname(fileURLToPath(import.meta.url));
|
|
const src = join(root, "src");
|
|
const dist = join(root, "dist");
|
|
|
|
mkdirSync(dist, { recursive: true });
|
|
|
|
for (const file of readdirSync(src)) {
|
|
if (file.endsWith(".css")) {
|
|
copyFileSync(join(src, file), join(dist, file));
|
|
}
|
|
}
|
|
|
|
console.log(`Copied styles to dist/`);
|