mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 08:45:50 +01:00
remove hard-coded libraries part 1
This commit is contained in:
@@ -23,11 +23,11 @@ const CODE_MIRROR = {
|
||||
]
|
||||
};
|
||||
|
||||
const ESLINT = {js: ["libraries/eslint.js"]};
|
||||
const ESLINT = {js: ["node_modules/eslint/bin/eslint.js"]};
|
||||
|
||||
const RELATION_MAP = {
|
||||
js: [
|
||||
"libraries/jsplumb.js",
|
||||
"node_modules/jsplumb/dist/js/jsplumb.min.js",
|
||||
"node_modules/panzoom/dist/panzoom.min.js"
|
||||
],
|
||||
css: [
|
||||
@@ -47,7 +47,7 @@ const KATEX = {
|
||||
};
|
||||
|
||||
const WHEEL_ZOOM = {
|
||||
js: [ "libraries/wheel-zoom.min.js"]
|
||||
js: [ "node_modules/vanilla-js-wheel-zoom/dist/wheel-zoom.min.js"]
|
||||
};
|
||||
|
||||
const FORCE_GRAPH = {
|
||||
@@ -68,7 +68,7 @@ const EXCALIDRAW = {
|
||||
|
||||
const MARKJS = {
|
||||
js: [
|
||||
"libraries/jquery.mark.es6.min.js"
|
||||
"node_modules/mark.js/dist/jquery.mark.es6.min.js"
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
@@ -71,6 +71,22 @@ function register(app: express.Application) {
|
||||
|
||||
app.use(`/${assetPath}/node_modules/panzoom/dist/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/panzoom/dist/')));
|
||||
|
||||
// Seems work without this, not sure will cause other bugs. Maybe can test without this for a while.
|
||||
// app.use(`/${assetPath}/node_modules/eslint/bin/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/eslint/bin/')));
|
||||
|
||||
app.use(`/${assetPath}/node_modules/jsplumb/dist/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/jsplumb/dist/')));
|
||||
|
||||
app.use(`/${assetPath}/node_modules/vanilla-js-wheel-zoom/dist/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/vanilla-js-wheel-zoom/dist/')));
|
||||
|
||||
app.use(`/${assetPath}/node_modules/mark.js/dist/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/mark.js/dist/')));
|
||||
|
||||
// Error and deprecated, https://www.npmjs.com/package/autocomplete.js?activeTab=readme
|
||||
// app.use(`/${assetPath}/node_modules/autocomplete.js/dist/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/autocomplete.js/dist/')));
|
||||
|
||||
app.use(`/${assetPath}/node_modules/knockout/build/output/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/knockout/build/output/')));
|
||||
|
||||
app.use(`/${assetPath}/node_modules/normalize.css/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/normalize.css/')));
|
||||
|
||||
// i18n
|
||||
app.use(`/${assetPath}/node_modules/i18next/`, persistentCacheStatic(path.join(srcRoot, "..", 'node_modules/i18next/')));
|
||||
app.use(`/${assetPath}/node_modules/i18next-http-backend/`, persistentCacheStatic(path.join(srcRoot, "..", 'node_modules/i18next-http-backend/')));
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
<link href="<%= assetPath %>/libraries/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="<%= assetPath %>/libraries/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<script src="<%= assetPath %>/libraries/knockout.min.js"></script>
|
||||
<script src="<%= assetPath %>/node_modules/knockout/build/output/knockout-latest.js"></script>
|
||||
|
||||
<script src="<%= appPath %>/setup.js" crossorigin type="module"></script>
|
||||
<link href="<%= assetPath %>/stylesheets/theme-light.css" rel="stylesheet">
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<% } %>
|
||||
<script src="../<%= appPath %>/share.js"></script>
|
||||
<% if (!note.isLabelTruthy("shareOmitDefaultCss")) { %>
|
||||
<link href="../<%= assetPath %>/libraries/normalize.min.css" rel="stylesheet">
|
||||
<link href="../<%= assetPath %>/node_modules/normalize.css/normalize.css" rel="stylesheet">
|
||||
<link href="../<%= assetPath %>/stylesheets/share.css" rel="stylesheet">
|
||||
<% } %>
|
||||
<% if (note.type === 'text' || note.type === 'book') { %>
|
||||
|
||||
Reference in New Issue
Block a user