@devisfuture/electron-modular 1.1.3 → 1.1.5

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 +8 -14
  2. package/package.json +15 -2
package/README.md CHANGED
@@ -66,6 +66,13 @@ TypeScript setup:
66
66
 
67
67
  > Tip: This package is published as ESM. When importing local modules, use `.js` extensions in runtime imports, e.g. `import { UserModule } from "./user/module.js"`.
68
68
 
69
+ ## Folders (build outputs)
70
+
71
+ The `folders` option in `initSettings` tells the framework where your build artifacts live:
72
+
73
+ - `distRenderer` — the build output folder for your renderer (web) bundle (e.g. Vite/webpack output).
74
+ - `distMain` — the build output folder for your main process bundle (compiled ESM files).
75
+
69
76
  ---
70
77
 
71
78
  ## Quick Start
@@ -179,7 +186,7 @@ export class UserService {
179
186
 
180
187
  ### Approach 2: Provider Pattern (Advanced)
181
188
 
182
- Use `provide` and `useFactory` to expose only necessary interface.
189
+ Use `provide` and `useFactory` to expose only necessary types.
183
190
 
184
191
  #### tokens.ts
185
192
 
@@ -666,8 +673,6 @@ my-feature/
666
673
 
667
674
  ### 1. Use Providers for Cross-Module Communication
668
675
 
669
- ✅ **Good:**
670
-
671
676
  ```typescript
672
677
  {
673
678
  provide: AUTH_PROVIDER,
@@ -679,19 +684,10 @@ my-feature/
679
684
  }
680
685
  ```
681
686
 
682
- ❌ **Bad:**
683
-
684
- ```typescript
685
- // Don't export entire service
686
- exports: [AuthService];
687
- ```
688
-
689
687
  ### 2. Keep Services Focused
690
688
 
691
689
  Each service should have a single responsibility.
692
690
 
693
- ✅ **Good:**
694
-
695
691
  ```typescript
696
692
  @Injectable()
697
693
  export class ResourcesService {
@@ -706,8 +702,6 @@ export class CacheWindowsService {
706
702
 
707
703
  ### 3. Use Tokens for All Cross-Module Dependencies
708
704
 
709
- ✅ **Good:**
710
-
711
705
  ```typescript
712
706
  export const RESOURCES_REST_API_PROVIDER = Symbol("RESOURCES_REST_API_PROVIDER");
713
707
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devisfuture/electron-modular",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Core module system, DI container, IPC handlers, and window utilities for Electron main process.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -47,7 +47,20 @@
47
47
  "ipc",
48
48
  "windows",
49
49
  "decorators",
50
- "container"
50
+ "dependency-injection",
51
+ "modular-architecture",
52
+ "di-container",
53
+ "inversion-of-control",
54
+ "decorator-pattern",
55
+ "main-process",
56
+ "renderer-process",
57
+ "esm",
58
+ "reflect-metadata",
59
+ "lifecycle-hooks",
60
+ "provider-pattern",
61
+ "electron-node",
62
+ "electron-modules",
63
+ "electron-architecture"
51
64
  ],
52
65
  "license": "MIT"
53
66
  }