fix(FN-0000): include compound engineering dashboard css
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "tsc && node scripts/copy-css.mjs",
|
||||
"test": "vitest run --silent=passed-only --reporter=dot"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env node
|
||||
// Copies every .css file under src/ to the mirrored path under dist/.
|
||||
import { cp, mkdir, readdir } from "node:fs/promises";
|
||||
import { dirname, join, relative } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const root = dirname(fileURLToPath(import.meta.url)) + "/..";
|
||||
const srcDir = join(root, "src");
|
||||
const distDir = join(root, "dist");
|
||||
|
||||
async function* cssFiles(dir) {
|
||||
for (const entry of await readdir(dir, { withFileTypes: true })) {
|
||||
const full = join(dir, entry.name);
|
||||
if (entry.isDirectory()) yield* cssFiles(full);
|
||||
else if (entry.isFile() && entry.name.endsWith(".css")) yield full;
|
||||
}
|
||||
}
|
||||
|
||||
for await (const file of cssFiles(srcDir)) {
|
||||
const dest = join(distDir, relative(srcDir, file));
|
||||
await mkdir(dirname(dest), { recursive: true });
|
||||
await cp(file, dest);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import manifest from "../../manifest.json";
|
||||
import packageJson from "../../package.json";
|
||||
import plugin from "../index.js";
|
||||
import { COMPOUND_ENGINEERING_SKILLS } from "../skills.js";
|
||||
import { settingsSchema } from "../settings.js";
|
||||
@@ -75,6 +76,11 @@ describe("compound engineering plugin manifest", () => {
|
||||
expect(typeof plugin.hooks?.onLoad).toBe("function");
|
||||
});
|
||||
|
||||
it("copies dashboard CSS into dist during build", () => {
|
||||
expect(packageJson.scripts.build).toContain("tsc");
|
||||
expect(packageJson.scripts.build).toContain("node scripts/copy-css.mjs");
|
||||
});
|
||||
|
||||
it("wires the settings schema onto the runtime manifest and manifest.json (U9)", () => {
|
||||
const expectedKeys = [
|
||||
"defaultProvider",
|
||||
|
||||
Reference in New Issue
Block a user