@gjsify/example-node-cli-deepkit-events 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +22 -0
  2. package/package.json +37 -0
package/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # @gjsify/example-cli-deepkit-events
2
+
3
+ This example demonstrates the event-driven architecture of [@deepkit/event](https://deepkit.io/library/event) running on GJS via Gjsify.
4
+
5
+ ## Features
6
+
7
+ - **Simple events** — `EventToken` with no data payload
8
+ - **Data events** — `DataEventToken<T>` carrying typed payload
9
+ - **Multiple listeners** — one event triggers many handlers
10
+ - **Listener ordering** — control execution order with priority
11
+ - **Custom event classes** — rich event objects extending `BaseEvent`
12
+ - **Propagation control** — `stopImmediatePropagation()` to short-circuit
13
+ - **Unsubscribe** — dynamically remove listeners
14
+ - **Real-world pattern** — event-driven notification system with metrics
15
+
16
+ ## Build & Run
17
+
18
+ ```bash
19
+ yarn build
20
+ yarn start:node # Run on Node.js
21
+ yarn start:gjs # Run on GJS
22
+ ```
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@gjsify/example-node-cli-deepkit-events",
3
+ "version": "0.1.3",
4
+ "description": "Demonstrates Deepkit event-driven architecture on GJS",
5
+ "main": "dist/index.gjs.js",
6
+ "type": "module",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "engines": {
11
+ "node": "16",
12
+ "gjs": "1.72.x"
13
+ },
14
+ "scripts": {
15
+ "clear": "rm -rf dist tsconfig.tsbuildinfo",
16
+ "check": "tsc --noEmit",
17
+ "start": "yarn start:node && yarn start:gjs",
18
+ "start:gjs": "gjs -m dist/index.gjs.js",
19
+ "start:node": "node dist/index.node.mjs",
20
+ "build": "yarn build:gjs && yarn build:node",
21
+ "build:gjs": "gjsify build src/index.ts --app gjs --outfile dist/index.gjs.js",
22
+ "build:node": "gjsify build src/index.ts --app node --outfile dist/index.node.mjs",
23
+ "test": "yarn start"
24
+ },
25
+ "devDependencies": {
26
+ "@deepkit/core": "^1.0.19",
27
+ "@deepkit/event": "^1.0.19",
28
+ "@deepkit/injector": "^1.0.19",
29
+ "@deepkit/type": "^1.0.19",
30
+ "@gjsify/cli": "^0.1.3",
31
+ "@gjsify/node-globals": "^0.1.3",
32
+ "@types/node": "^25.5.2",
33
+ "typescript": "^6.0.2"
34
+ },
35
+ "author": "Pascal Garber <pascal@artandcode.studio>",
36
+ "license": "MIT"
37
+ }