You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/site/index.html
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,15 @@
7
7
<metaname="description" content="Ghostbird is a Thunderbird add-on that connects your text editor with Thunderbird's email compose window, allowing you to edit the message in the text editor.">
- Compiling bundled JavaScript files into `dist/ext/`.
54
54
- Running `yarn build-xpi` creates a zip archive named `dist/ghostbird-{version}.xpi`.
55
55
-[The `web-ext` tool](https://github.com/mozilla/web-ext#web-ext) does the actual work.
56
-
- The usual `yarn build` runs both of the above after running the linter and tests.
56
+
- The usual `yarn build`, which is used by the CI, runs both of the above after running the linter and tests.
57
57
-`yarn watch` is an alias for `yarn build-js --watch`, which runs the build continuously.
58
58
59
59
## Build modes
@@ -111,5 +111,5 @@ The build script assumes four use cases, each using a different source of versio
111
111
112
112
- Building with `ext/manifest.json` should produce identical results to one from CI in terms of file names and their contents.
113
113
- However, they will have different timestamps and file order, meaning Ghostbird builds are not strictly reproducible.
114
-
- It would be possible to wipe `mtime`s to produce strictly identical zips, but this was considered pointless as AMO repackages the zip when signing the add-on anyway.
114
+
- It would be possible to wipe `mtime`s to produce strictly identical zips, but this was considered pointless as ~~AMO repackages the zip when signing the add-on anyway.~~**Edit:** It turns out Firefox add-ons are repackaged while Thunderbird add-ons are not, so there may be a point to this after all. PRs welcome.
115
115
- See [the issue page for the `web-ext` tool](https://github.com/mozilla/web-ext/issues/2381#issuecomment-1075667618) for details.
* See [building.md](./building.md) for details on build script internals.
176
176
177
+
* We rely on GitHub Actions for CI and releases.
178
+
177
179
## Structure of the code<aid="structure"></a>
178
180
179
181
The code loosely follows the [Ports and Adapters architecture](https://8thlight.com/insights/a-color-coded-guide-to-ports-and-adapters) and adheres to the [Dependency Inversion Principle](https://en.wikipedia.org/wiki/Dependency_inversion_principle).
@@ -188,21 +190,21 @@ The code loosely follows the [Ports and Adapters architecture](https://8thlight.
188
190
189
191
The source code is located in the `src/` directory. The main files are:
190
192
191
-
-`src/root/background.ts`: A background script that manages the WebSocket connection to the GhostText server and relays messages between the compose script and the server. Bundled as `background.js`.
192
-
-`src/root/compose.ts`: A compose script that adds a button to the mail compose window. Bundled as `compose.js`.
193
-
-`src/root/options.ts`: An options page for configuring settings such as the server URL and text editor to use. Bundled as `options.js` and used by `ext/options.html`.
193
+
-[`src/root/background.ts`][backgroundts]: A background script that manages the WebSocket connection to the GhostText server and relays messages between the compose script and the server. Bundled as `background.js`.
194
+
-[`src/root/compose.ts`][composets]: A compose script that adds a button to the mail compose window. Bundled as `compose.js`.
195
+
-[`src/root/options.ts`][optionsts]: An options page for configuring settings such as the server URL and text editor to use. Bundled as `options.js` and used by `ext/options.html`.
194
196
195
197
Other directories are:
196
198
197
-
-`src/app-background/`: Infrastructure of `background.ts` that handles Thunderbird events.
198
-
-`src/app-compose/`: Infrastructure of `compose.ts` that handles Thunderbird events.
199
-
-`src/app-options/`: Infrastructure of `options.ts` that handles Thunderbird events.
200
-
-`src/ghosttext-session/`: Main module of the add-on implementing the protocol.
201
-
-`src/ghosttext-runner/`: Facilitator that works together with `ghosttext-session`which feeds events into it and execute decisions made.
202
-
-`src/ghosttext-adaptor/`: Helpers of `ghosttext-runner`.
203
-
-`src/test/`: Test code.
204
-
-`src/thunderbird/`: Wrapper of the Thunderbird MailExtension API.
205
-
-`src/util/`: Utility modules used by multiple modules.
199
+
-[`src/app-background/`](../src/app-background/): Infrastructure of [`background.ts`][backgroundts] that handles Thunderbird events.
200
+
-[`src/app-compose/`](../src/app-compose/): Infrastructure of [`compose.ts`][composets] that handles Thunderbird events.
201
+
-[`src/app-options/`](../src/app-options/): Infrastructure of [`options.ts`][optionsts] that handles Thunderbird events.
202
+
-[`src/ghosttext-session/`](../src/ghosttext-session/): Main module of the add-on implementing the protocol.
203
+
-[`src/ghosttext-runner/`](../src/ghosttext-runner/): Facilitator that works together with `ghosttext-session`by feeding events into it and execute decisions made.
204
+
-[`src/ghosttext-adaptor/`](../src/ghosttext-adaptor/): Helpers of `ghosttext-runner`.
205
+
-[`src/test/`](../src/test/): Test code.
206
+
-[`src/thunderbird/`](../src/thunderbird/): Wrapper of the Thunderbird MailExtension API.
207
+
-[`src/util/`](../src/util/): Utility modules used by multiple modules.
TL;DR: `root` module contains entry point and the [Composition Root][ploeh].
301
303
302
-
*`root/startup/startup_{background,compose,options}.ts` is used at the toplevel modules, namely `background.ts`, `compose.ts`, and `options.ts`. It initializes classes.
304
+
*[`root/startup/startup_*.ts`][startupdir] are used at the toplevel modules, namely [`background.ts`][backgroundts], [`compose.ts`][composets], and [`options.ts`][optionsts]. It initializes classes.
303
305
* All the non-root classes in the codebase are either:
304
306
* A) instantiated by `startup*()`, or
305
307
* B) instantiated directly with `new` operator by instances of (A).
@@ -317,7 +319,7 @@ TL;DR: `root` module contains entry point and the [Composition Root][ploeh].
317
319
* A class may define `static aliases: string[] | string` to have the other name.
318
320
* Name clashes will result in error at startup, except ones passed to classes with `wantArray = true`.
319
321
* Use of automatic instantiation must be restricted to `root/` to make the code easier to follow.
320
-
*`test/startup.test.ts` contains tests to verify that all classes registered can be instantiated successfully.
322
+
*[`test/startup.test.ts`](../src/test/startup.test.ts) contains tests to verify that all classes registered can be instantiated successfully.
321
323
* See [FAQ](./faq-architectural.md) for some design decisions and justification.
Copy file name to clipboardExpand all lines: doc/faq.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,12 +87,12 @@
87
87
88
88
### Why not use External Editor Revived as a base?
89
89
90
-
(For those who don't know: [External Editor Revived by @Frederick888](https://github.com/Frederick888/external-editor-revived) is an add-on for Thunderbird that lets you edit email text in an external text editor, which works in recent Thunderbird versions and is actively maintained)
90
+
(For those who don't know: [External Editor Revived by @Frederick888](https://github.com/Frederick888/external-editor-revived) is an add-on for Thunderbird that lets you edit email text in an external text editor, which works in recent Thunderbird versions and is well-maintained)
91
91
92
92
* I started working on Ghostbird while mostly offline. Had I known about ERR's existence, Ghostbird wouldn't exist now!
93
93
* ERR works using [Native Messaging](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging), which is the only way to launch external process in recent Thunderbird API. It requires a companion app to be installed and registered as a Native Messaging Host. See [ERR's Wiki pages](https://github.com/Frederick888/external-editor-revived/wiki) for details.
94
94
* Reasons to continue developing Ghostbird? I think GhostText's live updating functionality is pretty (for now; there is no fundamental reason ERR can't do the same).
95
-
* That said, I think you should try ERR before using Ghostbird, which is still in alpha, as ERR is more mature and already on [AMO][revived].
95
+
* That said, I think you should try ERR before using Ghostbird, which is still in beta, as ERR is more mature and already listed on [AMO][revived] as a stable extension.
0 commit comments