Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 2d5754c

Browse files
committed
refactor(client,server): remove redundant libraries directory
1 parent 9f694fa commit 2d5754c

7 files changed

Lines changed: 4 additions & 215 deletions

File tree

_regroup/eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export default tseslint.config(
4444
"dist/*",
4545
"docs/*",
4646
"demo/*",
47-
"libraries/*",
4847
"src/public/app-dist/*",
4948
"src/public/app/doc_notes/*"
5049
]

_regroup/eslint.format.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export default [
3838
"dist/*",
3939
"docs/*",
4040
"demo/*",
41-
"libraries/*",
4241
// TriliumNextTODO: check if we want to format packages here as well - for now skipping it
4342
"packages/*",
4443
"src/public/app-dist/*",

apps/client/src/libraries/codemirror/hcl.js

Lines changed: 0 additions & 204 deletions
This file was deleted.

apps/client/vite.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { viteStaticCopy } from 'vite-plugin-static-copy'
55
import asset_path from './src/asset_path';
66
import webpackStatsPlugin from 'rollup-plugin-webpack-stats';
77

8-
const assets = [ "assets", "stylesheets", "libraries", "fonts", "translations" ];
8+
const assets = [ "assets", "stylesheets", "fonts", "translations" ];
99

1010
export default defineConfig(() => ({
1111
root: __dirname,

apps/server/src/routes/assets.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ async function register(app: express.Application) {
3636

3737
app.use(`/${assetUrlFragment}/src`, persistentCacheStatic(path.join(publicDir, "src")));
3838
app.use(`/${assetUrlFragment}/stylesheets`, persistentCacheStatic(path.join(publicDir, "stylesheets")));
39-
app.use(`/${assetUrlFragment}/libraries`, persistentCacheStatic(path.join(publicDir, "libraries")));
4039
app.use(`/${assetUrlFragment}/fonts`, persistentCacheStatic(path.join(publicDir, "fonts")));
4140
app.use(`/${assetUrlFragment}/translations/`, persistentCacheStatic(path.join(publicDir, "translations")));
4241
app.use(`/node_modules/`, persistentCacheStatic(path.join(publicDir, "node_modules")));
@@ -46,8 +45,6 @@ async function register(app: express.Application) {
4645
app.use(`/assets/vX/fonts`, express.static(path.join(srcRoot, "public/fonts")));
4746
app.use(`/assets/vX/images`, express.static(path.join(srcRoot, "..", "images")));
4847
app.use(`/assets/vX/stylesheets`, express.static(path.join(srcRoot, "public/stylesheets")));
49-
app.use(`/${assetUrlFragment}/libraries`, persistentCacheStatic(path.join(srcRoot, "public/libraries")));
50-
app.use(`/assets/vX/libraries`, express.static(path.join(srcRoot, "..", "libraries")));
5148
}
5249

5350
export default {

apps/server/src/services/log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function error(message: string | Error | unknown) {
7373
log(`ERROR: ${message}`);
7474
}
7575

76-
const requestBlacklist = ["/libraries", "/app", "/images", "/stylesheets", "/api/recent-notes"];
76+
const requestBlacklist = ["/app", "/images", "/stylesheets", "/api/recent-notes"];
7777

7878
function request(req: Request, res: Response, timeMs: number, responseLength: number | string = "?") {
7979
for (const bl of requestBlacklist) {

packages/commons/src/lib/mime_type.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ export interface MimeTypeDefinition {
99
mime: string;
1010
/** The name of the language/mime type as defined by highlight.js (or one of the aliases), in order to be used for syntax highlighting such as inside code blocks. */
1111
mdLanguageCode?: string;
12-
/** If specified, will load the corresponding highlight file from the given path instead of `node_modules`. */
13-
codeMirrorSource?: string;
1412
}
1513

1614
export interface MimeType extends MimeTypeDefinition {
@@ -43,7 +41,7 @@ export const MIME_TYPES_DICT: readonly MimeTypeDefinition[] = Object.freeze([
4341
{ title: "ASN.1", mime: "text/x-ttcn-asn" },
4442
{ title: "ASP.NET", mime: "application/x-aspx" },
4543
{ title: "Asterisk", mime: "text/x-asterisk" },
46-
{ title: "Batch file (DOS)", mime: "application/x-bat", highlightJs: "dos", codeMirrorSource: "libraries/codemirror/batch.js" },
44+
{ title: "Batch file (DOS)", mime: "application/x-bat", highlightJs: "dos" },
4745
{ title: "Brainfuck", mime: "text/x-brainfuck", mdLanguageCode: "brainfuck" },
4846
{ title: "C", mime: "text/x-csrc", mdLanguageCode: "c", default: true },
4947
{ title: "C#", mime: "text/x-csharp", mdLanguageCode: "csharp", default: true },
@@ -174,7 +172,7 @@ export const MIME_TYPES_DICT: readonly MimeTypeDefinition[] = Object.freeze([
174172
{ title: "Swift", mime: "text/x-swift", default: true },
175173
{ title: "SystemVerilog", mime: "text/x-systemverilog" },
176174
{ title: "Tcl", mime: "text/x-tcl", mdLanguageCode: "tcl" },
177-
{ title: "Terraform (HCL)", mime: "text/x-hcl", highlightJs: "terraform", highlightJsSource: "libraries", codeMirrorSource: "libraries/codemirror/hcl.js" },
175+
{ title: "Terraform (HCL)", mime: "text/x-hcl", highlightJs: "terraform" },
178176
{ title: "Textile", mime: "text/x-textile" },
179177
{ title: "TiddlyWiki ", mime: "text/x-tiddlywiki" },
180178
{ title: "Tiki wiki", mime: "text/tiki" },

0 commit comments

Comments
 (0)