mirror of
https://github.com/zadam/trilium.git
synced 2025-12-30 03:04:29 +01:00
chore(server): address self-review
This commit is contained in:
parent
12875ec308
commit
c2c19e8ecd
@ -39,7 +39,7 @@ async function register(app: express.Application) {
|
|||||||
} else {
|
} else {
|
||||||
const publicDir = path.join(resourceDir, "public");
|
const publicDir = path.join(resourceDir, "public");
|
||||||
if (!existsSync(publicDir)) {
|
if (!existsSync(publicDir)) {
|
||||||
throw new Error(`Public directory is missing at: ${ path.resolve(publicDir)}`);
|
throw new Error(`Public directory is missing at: ${path.resolve(publicDir)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
app.use(`/${assetUrlFragment}/src`, persistentCacheStatic(path.join(publicDir, "src")));
|
app.use(`/${assetUrlFragment}/src`, persistentCacheStatic(path.join(publicDir, "src")));
|
||||||
|
|||||||
@ -138,7 +138,6 @@ describe("CSS generation", () => {
|
|||||||
expect(processedResult).toBeTruthy();
|
expect(processedResult).toBeTruthy();
|
||||||
const css = generateCss(processedResult!, `/api/attachments/${processedResult?.fontAttachmentId}/download`);
|
const css = generateCss(processedResult!, `/api/attachments/${processedResult?.fontAttachmentId}/download`);
|
||||||
|
|
||||||
console.log(css);
|
|
||||||
expect(css).toContain("@font-face");
|
expect(css).toContain("@font-face");
|
||||||
expect(css).toContain("font-family: 'trilium-icon-pack-bx'");
|
expect(css).toContain("font-family: 'trilium-icon-pack-bx'");
|
||||||
expect(css).toContain(`src: url('/api/attachments/${processedResult?.fontAttachmentId}/download') format('woff2');`);
|
expect(css).toContain(`src: url('/api/attachments/${processedResult?.fontAttachmentId}/download') format('woff2');`);
|
||||||
|
|||||||
8826
boxicons-v2.json
8826
boxicons-v2.json
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user