mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 07:08:55 +02:00
fix(desktop): share theme not loaded
This commit is contained in:
parent
2262d300f7
commit
2bebed1b0f
@ -98,6 +98,11 @@
|
|||||||
"input": "apps/server/dist/assets",
|
"input": "apps/server/dist/assets",
|
||||||
"output": "assets"
|
"output": "assets"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"glob": "**/*",
|
||||||
|
"input": "packages/share-theme/src/templates",
|
||||||
|
"output": "share-theme/templates"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"glob": "**/*",
|
"glob": "**/*",
|
||||||
"input": "apps/desktop/src/assets",
|
"input": "apps/desktop/src/assets",
|
||||||
|
46
apps/desktop/spec/build-checks/artifacts.spec.ts
Normal file
46
apps/desktop/spec/build-checks/artifacts.spec.ts
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
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"
|
||||||
|
];
|
||||||
|
|
||||||
|
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"
|
||||||
|
];
|
||||||
|
|
||||||
|
ensurePathsExist(paths);
|
||||||
|
});
|
||||||
|
|
||||||
|
function ensurePathsExist(paths: string[]) {
|
||||||
|
for (const path of paths) {
|
||||||
|
const result = globSync(join(distPath, path, "**"));
|
||||||
|
expect(result, path).not.toHaveLength(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
18
apps/desktop/vitest.build.config.mts
Normal file
18
apps/desktop/vitest.build.config.mts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/// <reference types='vitest' />
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig(() => ({
|
||||||
|
root: __dirname,
|
||||||
|
cacheDir: '../../node_modules/.vite/apps/server',
|
||||||
|
plugins: [],
|
||||||
|
test: {
|
||||||
|
watch: false,
|
||||||
|
globals: true,
|
||||||
|
setupFiles: ["./spec/setup.ts"],
|
||||||
|
environment: "node",
|
||||||
|
include: ['spec/build-checks/**'],
|
||||||
|
reporters: [
|
||||||
|
"verbose"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
}));
|
Loading…
x
Reference in New Issue
Block a user