mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	chore(share): prebuilt template
This commit is contained in:
		| @@ -18,6 +18,7 @@ | |||||||
|   "license": "ISC", |   "license": "ISC", | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "@digitak/esrun": "^3.2.24", |     "@digitak/esrun": "^3.2.24", | ||||||
|  |     "@digitalmaas/esbuild-plugin-ejs": "1.0.0", | ||||||
|     "@types/swagger-ui": "^3.52.0", |     "@types/swagger-ui": "^3.52.0", | ||||||
|     "@typescript-eslint/eslint-plugin": "^6.7.2", |     "@typescript-eslint/eslint-plugin": "^6.7.2", | ||||||
|     "@typescript-eslint/parser": "^6.7.2", |     "@typescript-eslint/parser": "^6.7.2", | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| import fs from "node:fs"; | import fs from "node:fs"; | ||||||
| import path from "node:path"; | import path from "node:path"; | ||||||
|  | import ejsPlugin from "@digitalmaas/esbuild-plugin-ejs"; | ||||||
| // import {fileURLToPath} from "node:url"; | // import {fileURLToPath} from "node:url"; | ||||||
|  |  | ||||||
| import dotenv from "dotenv"; | import dotenv from "dotenv"; | ||||||
| @@ -15,9 +16,30 @@ const rootDir = path.dirname(process.env.npm_package_json!); | |||||||
|  |  | ||||||
| dotenv.config(); | dotenv.config(); | ||||||
|  |  | ||||||
| const modules = ["scripts", "styles"]; | const modules = ["scripts", "styles", "templates"]; | ||||||
| const entryPoints: {in: string, out: string}[] = []; | const entryPoints: {in: string, out: string}[] = []; | ||||||
| const makeEntry = (mod: string) => ({"in": path.join(rootDir, "src", mod, mod === "styles" ? "index.css" : "index.ts"), "out": mod}); |  | ||||||
|  | function makeEntry(mod: string) { | ||||||
|  |     let entrypoint: string; | ||||||
|  |     switch (mod) { | ||||||
|  |         case "styles": | ||||||
|  |             entrypoint = "index.css"; | ||||||
|  |             break; | ||||||
|  |         case "scripts": | ||||||
|  |             entrypoint = "index.ts"; | ||||||
|  |             break; | ||||||
|  |         case "templates": | ||||||
|  |             entrypoint = "page.ejs"; | ||||||
|  |             break; | ||||||
|  |         default: | ||||||
|  |             throw new Error(`Unknown module type ${mod}.`); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     return { | ||||||
|  |         "in": path.join(rootDir, "src", mod, entrypoint), | ||||||
|  |         "out": mod | ||||||
|  |     }; | ||||||
|  | } | ||||||
|  |  | ||||||
| const modulesRequested = process.argv.filter(a => a.startsWith("--module=")); | const modulesRequested = process.argv.filter(a => a.startsWith("--module=")); | ||||||
| for (const mod of modulesRequested) { | for (const mod of modulesRequested) { | ||||||
| @@ -36,6 +58,9 @@ async function runBuild() { | |||||||
|         outdir: path.join(rootDir, "dist"), |         outdir: path.join(rootDir, "dist"), | ||||||
|         format: "cjs", |         format: "cjs", | ||||||
|         target: ["chrome96"], |         target: ["chrome96"], | ||||||
|  |         plugins: [ | ||||||
|  |             ejsPlugin() | ||||||
|  |         ], | ||||||
|         loader: { |         loader: { | ||||||
|             ".png": "dataurl", |             ".png": "dataurl", | ||||||
|             ".gif": "dataurl", |             ".gif": "dataurl", | ||||||
|   | |||||||
							
								
								
									
										39
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										39
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							| @@ -473,9 +473,6 @@ importers: | |||||||
|       '@braintree/sanitize-url': |       '@braintree/sanitize-url': | ||||||
|         specifier: 7.1.1 |         specifier: 7.1.1 | ||||||
|         version: 7.1.1 |         version: 7.1.1 | ||||||
|       '@digitalmaas/esbuild-plugin-ejs': |  | ||||||
|         specifier: 1.0.0 |  | ||||||
|         version: 1.0.0(esbuild@0.25.5) |  | ||||||
|       '@electron/remote': |       '@electron/remote': | ||||||
|         specifier: 2.1.2 |         specifier: 2.1.2 | ||||||
|         version: 2.1.2(electron@36.4.0) |         version: 2.1.2(electron@36.4.0) | ||||||
| @@ -1282,6 +1279,9 @@ importers: | |||||||
|       '@digitak/esrun': |       '@digitak/esrun': | ||||||
|         specifier: ^3.2.24 |         specifier: ^3.2.24 | ||||||
|         version: 3.2.26 |         version: 3.2.26 | ||||||
|  |       '@digitalmaas/esbuild-plugin-ejs': | ||||||
|  |         specifier: 1.0.0 | ||||||
|  |         version: 1.0.0(esbuild@0.25.5) | ||||||
|       '@types/swagger-ui': |       '@types/swagger-ui': | ||||||
|         specifier: ^3.52.0 |         specifier: ^3.52.0 | ||||||
|         version: 3.52.4 |         version: 3.52.4 | ||||||
| @@ -1303,9 +1303,6 @@ importers: | |||||||
|       highlight.js: |       highlight.js: | ||||||
|         specifier: ^11.8.0 |         specifier: ^11.8.0 | ||||||
|         version: 11.11.1 |         version: 11.11.1 | ||||||
|       trilium-etapi: |  | ||||||
|         specifier: ^0.1.2 |  | ||||||
|         version: 0.1.2 |  | ||||||
|       typescript: |       typescript: | ||||||
|         specifier: ^5.2.2 |         specifier: ^5.2.2 | ||||||
|         version: 5.8.3 |         version: 5.8.3 | ||||||
| @@ -5813,9 +5810,6 @@ packages: | |||||||
|   canvas-roundrect-polyfill@0.0.1: |   canvas-roundrect-polyfill@0.0.1: | ||||||
|     resolution: {integrity: sha512-yWq+R3U3jE+coOeEb3a3GgE2j/0MMiDKM/QpLb6h9ihf5fGY9UXtvK9o4vNqjWXoZz7/3EaSVU3IX53TvFFUOw==} |     resolution: {integrity: sha512-yWq+R3U3jE+coOeEb3a3GgE2j/0MMiDKM/QpLb6h9ihf5fGY9UXtvK9o4vNqjWXoZz7/3EaSVU3IX53TvFFUOw==} | ||||||
|  |  | ||||||
|   centra@2.7.0: |  | ||||||
|     resolution: {integrity: sha512-PbFMgMSrmgx6uxCdm57RUos9Tc3fclMvhLSATYN39XsDV29B89zZ3KA89jmY0vwSGazyU+uerqwa6t+KaodPcg==} |  | ||||||
|  |  | ||||||
|   chai@5.2.0: |   chai@5.2.0: | ||||||
|     resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} |     resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} | ||||||
|     engines: {node: '>=12'} |     engines: {node: '>=12'} | ||||||
| @@ -10037,10 +10031,6 @@ packages: | |||||||
|   perfect-freehand@1.2.0: |   perfect-freehand@1.2.0: | ||||||
|     resolution: {integrity: sha512-h/0ikF1M3phW7CwpZ5MMvKnfpHficWoOEyr//KVNTxV4F6deRK1eYMtHyBKEAKFK0aXIEUK9oBvlF6PNXMDsAw==} |     resolution: {integrity: sha512-h/0ikF1M3phW7CwpZ5MMvKnfpHficWoOEyr//KVNTxV4F6deRK1eYMtHyBKEAKFK0aXIEUK9oBvlF6PNXMDsAw==} | ||||||
|  |  | ||||||
|   phin@3.7.1: |  | ||||||
|     resolution: {integrity: sha512-GEazpTWwTZaEQ9RhL7Nyz0WwqilbqgLahDM3D0hxWwmVDI52nXEybHqiN6/elwpkJBhcuj+WbBu+QfT0uhPGfQ==} |  | ||||||
|     engines: {node: '>= 8'} |  | ||||||
|  |  | ||||||
|   pica@7.1.1: |   pica@7.1.1: | ||||||
|     resolution: {integrity: sha512-WY73tMvNzXWEld2LicT9Y260L43isrZ85tPuqRyvtkljSDLmnNFQmZICt4xUJMVulmcc6L9O7jbBrtx3DOz/YQ==} |     resolution: {integrity: sha512-WY73tMvNzXWEld2LicT9Y260L43isrZ85tPuqRyvtkljSDLmnNFQmZICt4xUJMVulmcc6L9O7jbBrtx3DOz/YQ==} | ||||||
|  |  | ||||||
| @@ -12269,10 +12259,6 @@ packages: | |||||||
|     resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} |     resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} | ||||||
|     hasBin: true |     hasBin: true | ||||||
|  |  | ||||||
|   trilium-etapi@0.1.2: |  | ||||||
|     resolution: {integrity: sha512-es86UOZaUCmpkdH2xNk5GGusJ2UpfxgqFpWdr7y6j7ZxNHS4q9H1mzKlslT6skTKwqUoFvZSV9jfNEqEwgsAvw==} |  | ||||||
|     engines: {node: '>=16'} |  | ||||||
|  |  | ||||||
|   trim-repeated@1.0.0: |   trim-repeated@1.0.0: | ||||||
|     resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} |     resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} | ||||||
|     engines: {node: '>=0.10.0'} |     engines: {node: '>=0.10.0'} | ||||||
| @@ -19386,12 +19372,6 @@ snapshots: | |||||||
|  |  | ||||||
|   canvas-roundrect-polyfill@0.0.1: {} |   canvas-roundrect-polyfill@0.0.1: {} | ||||||
|  |  | ||||||
|   centra@2.7.0: |  | ||||||
|     dependencies: |  | ||||||
|       follow-redirects: 1.15.9(debug@4.4.1) |  | ||||||
|     transitivePeerDependencies: |  | ||||||
|       - debug |  | ||||||
|  |  | ||||||
|   chai@5.2.0: |   chai@5.2.0: | ||||||
|     dependencies: |     dependencies: | ||||||
|       assertion-error: 2.0.1 |       assertion-error: 2.0.1 | ||||||
| @@ -24657,12 +24637,6 @@ snapshots: | |||||||
|  |  | ||||||
|   perfect-freehand@1.2.0: {} |   perfect-freehand@1.2.0: {} | ||||||
|  |  | ||||||
|   phin@3.7.1: |  | ||||||
|     dependencies: |  | ||||||
|       centra: 2.7.0 |  | ||||||
|     transitivePeerDependencies: |  | ||||||
|       - debug |  | ||||||
|  |  | ||||||
|   pica@7.1.1: |   pica@7.1.1: | ||||||
|     dependencies: |     dependencies: | ||||||
|       glur: 1.1.2 |       glur: 1.1.2 | ||||||
| @@ -27140,13 +27114,6 @@ snapshots: | |||||||
|  |  | ||||||
|   tree-kill@1.2.2: {} |   tree-kill@1.2.2: {} | ||||||
|  |  | ||||||
|   trilium-etapi@0.1.2: |  | ||||||
|     dependencies: |  | ||||||
|       '@types/node': 20.17.32 |  | ||||||
|       phin: 3.7.1 |  | ||||||
|     transitivePeerDependencies: |  | ||||||
|       - debug |  | ||||||
|  |  | ||||||
|   trim-repeated@1.0.0: |   trim-repeated@1.0.0: | ||||||
|     dependencies: |     dependencies: | ||||||
|       escape-string-regexp: 1.0.5 |       escape-string-regexp: 1.0.5 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user