mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
feat: run linonetwo/zx-script only in TiddlyGit
This commit is contained in:
parent
ee24bcb570
commit
409c59ed8b
3 changed files with 12 additions and 1 deletions
|
|
@ -7,3 +7,13 @@ For example: `tiddlywiki`
|
|||
1. `npm i tiddlywiki`
|
||||
1. Add `ExternalsPlugin` in webpack.plugins.js (maybe optional for some deps, tiddlywiki needs this because its custom `require` can't require things that is bundled by webpack. `dugite` don't need this step)
|
||||
1. Add a `await fs.copy(path.join(projectRoot, 'node_modules/@tiddlygit/tiddlywiki')` in `scripts/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 TiddlyGit
|
||||
|
||||
Edit `src/services/wiki/wikiWorker.ts`, add another line like:
|
||||
|
||||
```ts
|
||||
wikiInstance.boot.argv = [
|
||||
'+plugins/tiddlywiki/filesystem',
|
||||
'+plugins/tiddlywiki/tiddlyweb',
|
||||
```
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ function startNodeJSWiki({
|
|||
wikiInstance.boot.argv = [
|
||||
'+plugins/tiddlywiki/filesystem',
|
||||
'+plugins/tiddlywiki/tiddlyweb',
|
||||
'+plugins/linonetwo/zx-script',
|
||||
// '+plugins/linonetwo/watch-fs',
|
||||
homePath,
|
||||
'--listen',
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit d96ff365d103c9477a8fc1cdc276eb0b2bf2eed6
|
||||
Subproject commit 5f83d1a610108a955d5caf6983a72c6071ac79c6
|
||||
Loading…
Add table
Add a link
Reference in a new issue