feat: bundle tiddlyweb icons in ipc syncadaptor plugin

This commit is contained in:
lin onetwo 2023-06-18 16:43:45 +08:00
parent 18f6fb3256
commit e88a225f3b
22 changed files with 209 additions and 12 deletions

View file

@ -6,7 +6,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-call */
import esbuild from 'esbuild';
const outDir = path.join(__dirname, '../plugins-dev/linonetwo');
const outDir = path.join(__dirname, '../plugins-dev/linonetwo/tidgi');
await fs.mkdirp(outDir);
const tsconfigPath = path.join(__dirname, '../tsconfig.json');
const sourceFolder = '../src/services/wiki/plugin/ipcSyncAdaptor';
@ -14,9 +14,12 @@ await esbuild.build({
logLevel: 'info',
entryPoints: [path.join(__dirname, sourceFolder, 'index.ts')],
bundle: true,
// use node so we have `exports`, otherwise `module.adaptorClass` in $:/core/modules/startup.js will be undefined
platform: 'node',
minify: true,
outdir: outDir,
tsconfig: tsconfigPath,
target: 'ESNEXT',
});
const filterFunc = (src) => {
return !src.endsWith('.ts');