mirror of
https://github.com/zadam/trilium.git
synced 2026-01-18 20:44:26 +01:00
Changed edit-docs from a simple wrapper script to a properly built Nix package using makeApp, similar to how desktop and server are built. Changes: - Added build script to apps/edit-docs/package.json - Created apps/edit-docs/scripts/build.ts based on desktop's build script - Added edit-docs:build task to root package.json - Changed flake.nix to use makeApp which: - Builds edit-docs with all dependencies bundled - Creates a standalone trilium-edit-docs executable - Can be installed with 'nix profile install' and run from any directory This makes edit-docs truly reusable - it can now be installed and run from any project without requiring the Trilium source tree.
49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
import { globSync } from "fs";
|
|
import { join } from "path";
|
|
import { it, describe, expect } from "vitest";
|
|
|
|
describe("Check artifacts are present", () => {
|
|
const distPath = join(__dirname, "../../dist");
|
|
|
|
it("has the necessary node modules", async () => {
|
|
const paths = [
|
|
"node_modules/better-sqlite3",
|
|
"node_modules/bindings",
|
|
"node_modules/file-uri-to-path",
|
|
"node_modules/@electron/remote"
|
|
];
|
|
|
|
ensurePathsExist(paths);
|
|
});
|
|
|
|
it("includes the client", async () => {
|
|
const paths = [
|
|
"public/assets",
|
|
"public/fonts",
|
|
"public/node_modules",
|
|
"public/src",
|
|
"public/stylesheets",
|
|
"public/translations"
|
|
];
|
|
|
|
ensurePathsExist(paths);
|
|
});
|
|
|
|
it("includes necessary assets", async () => {
|
|
const paths = [
|
|
"assets",
|
|
"share-theme",
|
|
"ckeditor5-content.css"
|
|
];
|
|
|
|
ensurePathsExist(paths);
|
|
});
|
|
|
|
function ensurePathsExist(paths: string[]) {
|
|
for (const path of paths) {
|
|
const result = globSync(join(distPath, path, "**"));
|
|
expect(result, path).not.toHaveLength(0);
|
|
}
|
|
}
|
|
});
|