mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
785 B
785 B
Development guide
How to add dependency that used in a worker_thread
For example: tiddlywiki
npm i tiddlywiki- Add
ExternalsPluginin webpack.plugins.js (maybe optional for some deps, tiddlywiki needs this because its customrequirecan't require things that is bundled by webpack.dugitedon't need this step) - Add a
await fs.copy(path.join(projectRoot, 'node_modules/@tiddlygit/tiddlywiki')inscripts/afterPack.js, to copy things to resource folder, that is outside of asar, so it can be used by the worker_thread in electron
How to add plugin that only execute inside TidGi
Edit src/services/wiki/wikiWorker.ts, add another line like:
wikiInstance.boot.argv = [
'+plugins/tiddlywiki/filesystem',
'+plugins/tiddlywiki/tiddlyweb',