@leejungkiin/awkit 1.5.5 → 1.5.6

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 (108) hide show
  1. package/bin/awk.js +188 -8
  2. package/core/GEMINI.md +15 -7
  3. package/core/work-modes.json +45 -0
  4. package/package.json +1 -1
  5. package/skill-packs/cocos2d/pack.json +8 -0
  6. package/skill-packs/cocos2d/skills/cocos2d-x/LICENSE.txt +8 -0
  7. package/skill-packs/cocos2d/skills/cocos2d-x/SKILL.md +168 -0
  8. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/action.md +278 -0
  9. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/animation.md +220 -0
  10. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/event.md +133 -0
  11. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/input.md +291 -0
  12. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/label.md +184 -0
  13. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/node-scene.md +212 -0
  14. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/scene.md +228 -0
  15. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/sprite.md +206 -0
  16. package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/texture.md +186 -0
  17. package/skill-packs/cocos2d/skills/cocos2d-x/examples/getting-started/about-engine.md +53 -0
  18. package/skill-packs/cocos2d/skills/cocos2d-x/examples/getting-started/installation.md +203 -0
  19. package/skill-packs/cocos2d/skills/cocos2d-x/examples/getting-started/quick-start.md +134 -0
  20. package/skill-packs/electron/pack.json +9 -0
  21. package/skill-packs/electron/skills/electron/LICENSE.txt +202 -0
  22. package/skill-packs/electron/skills/electron/SKILL.md +160 -0
  23. package/skill-packs/electron/skills/electron/api/app.md +83 -0
  24. package/skill-packs/electron/skills/electron/api/browser-window.md +84 -0
  25. package/skill-packs/electron/skills/electron/examples/advanced/packaging.md +140 -0
  26. package/skill-packs/electron/skills/electron/examples/api/browser-window.md +182 -0
  27. package/skill-packs/electron/skills/electron/examples/api/menu.md +187 -0
  28. package/skill-packs/electron/skills/electron/examples/getting-started/installation.md +88 -0
  29. package/skill-packs/electron/skills/electron/examples/getting-started/quick-start.md +104 -0
  30. package/skill-packs/electron/skills/electron/examples/processes/ipc-communication.md +140 -0
  31. package/skill-packs/electron/skills/electron/examples/processes/main-process.md +121 -0
  32. package/skill-packs/electron/skills/electron/templates/main-process.md +105 -0
  33. package/skill-packs/electron/skills/electron/templates/preload-script.md +84 -0
  34. package/skill-packs/electron/skills/electron-egg/LICENSE.txt +202 -0
  35. package/skill-packs/electron/skills/electron-egg/SKILL.md +154 -0
  36. package/skill-packs/electron/skills/electron-egg/api/config-api.md +62 -0
  37. package/skill-packs/electron/skills/electron-egg/api/ipc-api.md +55 -0
  38. package/skill-packs/electron/skills/electron-egg/api/main-api.md +54 -0
  39. package/skill-packs/electron/skills/electron-egg/api/renderer-api.md +62 -0
  40. package/skill-packs/electron/skills/electron-egg/api/window-api.md +64 -0
  41. package/skill-packs/electron/skills/electron-egg/examples/features/ipc-communication.md +84 -0
  42. package/skill-packs/electron/skills/electron-egg/examples/features/main-process.md +89 -0
  43. package/skill-packs/electron/skills/electron-egg/examples/features/renderer-process.md +74 -0
  44. package/skill-packs/electron/skills/electron-egg/examples/guide/build.md +77 -0
  45. package/skill-packs/electron/skills/electron-egg/examples/guide/configuration.md +88 -0
  46. package/skill-packs/electron/skills/electron-egg/examples/guide/installation.md +66 -0
  47. package/skill-packs/electron/skills/electron-egg/examples/guide/intro.md +47 -0
  48. package/skill-packs/electron/skills/electron-egg/examples/guide/project-structure.md +73 -0
  49. package/skill-packs/electron/skills/electron-egg/examples/guide/quick-start.md +78 -0
  50. package/skill-packs/electron/skills/electron-egg/templates/configuration.md +63 -0
  51. package/skill-packs/electron/skills/electron-egg/templates/installation.md +42 -0
  52. package/skill-packs/electron/skills/electron-egg/templates/project-setup.md +75 -0
  53. package/skill-packs/flutter/pack.json +9 -0
  54. package/skill-packs/flutter/skills/flutter/LICENSE.txt +202 -0
  55. package/skill-packs/flutter/skills/flutter/SKILL.md +127 -0
  56. package/skill-packs/flutter/skills/flutter-project-creater/LICENSE.txt +202 -0
  57. package/skill-packs/flutter/skills/flutter-project-creater/SKILL.md +106 -0
  58. package/skill-packs/threejs/pack.json +25 -0
  59. package/skill-packs/threejs/skills/README.md +95 -0
  60. package/skill-packs/threejs/skills/threejs-animation/SKILL.md +86 -0
  61. package/skill-packs/threejs/skills/threejs-animation/examples/workflow-mixer-action.md +20 -0
  62. package/skill-packs/threejs/skills/threejs-animation/references/official-sections.md +19 -0
  63. package/skill-packs/threejs/skills/threejs-audio/SKILL.md +112 -0
  64. package/skill-packs/threejs/skills/threejs-audio/examples/workflow-positional-audio.md +15 -0
  65. package/skill-packs/threejs/skills/threejs-audio/references/official-sections.md +16 -0
  66. package/skill-packs/threejs/skills/threejs-camera/SKILL.md +96 -0
  67. package/skill-packs/threejs/skills/threejs-camera/examples/workflow-perspective-resize.md +13 -0
  68. package/skill-packs/threejs/skills/threejs-controls/SKILL.md +101 -0
  69. package/skill-packs/threejs/skills/threejs-controls/examples/workflow-orbit-damping.md +15 -0
  70. package/skill-packs/threejs/skills/threejs-dev-setup/SKILL.md +102 -0
  71. package/skill-packs/threejs/skills/threejs-dev-setup/examples/workflow-scaffold.md +24 -0
  72. package/skill-packs/threejs/skills/threejs-geometries/SKILL.md +108 -0
  73. package/skill-packs/threejs/skills/threejs-geometries/examples/workflow-extrude-shape.md +13 -0
  74. package/skill-packs/threejs/skills/threejs-helpers/SKILL.md +103 -0
  75. package/skill-packs/threejs/skills/threejs-helpers/examples/workflow-light-camera-helpers.md +13 -0
  76. package/skill-packs/threejs/skills/threejs-lights/SKILL.md +103 -0
  77. package/skill-packs/threejs/skills/threejs-lights/examples/workflow-directional-shadow.md +17 -0
  78. package/skill-packs/threejs/skills/threejs-loaders/SKILL.md +89 -0
  79. package/skill-packs/threejs/skills/threejs-loaders/examples/workflow-gltf-draco.md +22 -0
  80. package/skill-packs/threejs/skills/threejs-loaders/references/official-sections.md +27 -0
  81. package/skill-packs/threejs/skills/threejs-materials/SKILL.md +102 -0
  82. package/skill-packs/threejs/skills/threejs-materials/examples/workflow-pbr-transparent.md +15 -0
  83. package/skill-packs/threejs/skills/threejs-math/SKILL.md +102 -0
  84. package/skill-packs/threejs/skills/threejs-math/examples/workflow-ray-aabb.md +11 -0
  85. package/skill-packs/threejs/skills/threejs-node-tsl/SKILL.md +83 -0
  86. package/skill-packs/threejs/skills/threejs-node-tsl/examples/workflow-tsl-entry.md +13 -0
  87. package/skill-packs/threejs/skills/threejs-node-tsl/references/official-links.md +8 -0
  88. package/skill-packs/threejs/skills/threejs-node-tsl/references/tsl-vs-classic.md +23 -0
  89. package/skill-packs/threejs/skills/threejs-objects/SKILL.md +111 -0
  90. package/skill-packs/threejs/skills/threejs-objects/examples/workflow-raycaster-pick.md +17 -0
  91. package/skill-packs/threejs/skills/threejs-postprocessing/SKILL.md +116 -0
  92. package/skill-packs/threejs/skills/threejs-postprocessing/examples/workflow-composer-bloom.md +15 -0
  93. package/skill-packs/threejs/skills/threejs-renderers/SKILL.md +91 -0
  94. package/skill-packs/threejs/skills/threejs-renderers/examples/workflow-renderer-resize.md +21 -0
  95. package/skill-packs/threejs/skills/threejs-renderers/references/official-sections.md +14 -0
  96. package/skill-packs/threejs/skills/threejs-scenes/SKILL.md +90 -0
  97. package/skill-packs/threejs/skills/threejs-scenes/examples/workflow-fog-background.md +13 -0
  98. package/skill-packs/threejs/skills/threejs-textures/SKILL.md +83 -0
  99. package/skill-packs/threejs/skills/threejs-textures/examples/workflow-pmrem-env.md +19 -0
  100. package/skill-packs/threejs/skills/threejs-webxr/SKILL.md +104 -0
  101. package/skill-packs/threejs/skills/threejs-webxr/examples/workflow-xr-button.md +15 -0
  102. package/skills/telegram-notify/SKILL.md +1 -0
  103. package/skills/trello-sync/SKILL.md +7 -0
  104. package/templates/project-identity/android.json +26 -1
  105. package/templates/project-identity/backend-nestjs.json +26 -1
  106. package/templates/project-identity/expo.json +26 -1
  107. package/templates/project-identity/ios.json +26 -1
  108. package/templates/project-identity/web-nextjs.json +26 -1
@@ -0,0 +1,105 @@
1
+ # Main Process Template | 主进程模板
2
+
3
+ ## Basic Main Process Template
4
+
5
+ ```javascript
6
+ // main.js
7
+ const { app, BrowserWindow } = require('electron')
8
+ const path = require('path')
9
+
10
+ let mainWindow
11
+
12
+ function createWindow() {
13
+ mainWindow = new BrowserWindow({
14
+ width: 800,
15
+ height: 600,
16
+ webPreferences: {
17
+ preload: path.join(__dirname, 'preload.js'),
18
+ contextIsolation: true,
19
+ nodeIntegration: false
20
+ }
21
+ })
22
+
23
+ mainWindow.loadFile('index.html')
24
+
25
+ // Open DevTools in development
26
+ if (process.env.NODE_ENV === 'development') {
27
+ mainWindow.webContents.openDevTools()
28
+ }
29
+
30
+ mainWindow.on('closed', () => {
31
+ mainWindow = null
32
+ })
33
+ }
34
+
35
+ app.whenReady().then(() => {
36
+ createWindow()
37
+
38
+ app.on('activate', () => {
39
+ if (BrowserWindow.getAllWindows().length === 0) {
40
+ createWindow()
41
+ }
42
+ })
43
+ })
44
+
45
+ app.on('window-all-closed', () => {
46
+ if (process.platform !== 'darwin') {
47
+ app.quit()
48
+ }
49
+ })
50
+ ```
51
+
52
+ ## With IPC Setup
53
+
54
+ ```javascript
55
+ // main.js
56
+ const { app, BrowserWindow, ipcMain } = require('electron')
57
+ const path = require('path')
58
+
59
+ let mainWindow
60
+
61
+ function createWindow() {
62
+ mainWindow = new BrowserWindow({
63
+ width: 800,
64
+ height: 600,
65
+ webPreferences: {
66
+ preload: path.join(__dirname, 'preload.js'),
67
+ contextIsolation: true,
68
+ nodeIntegration: false
69
+ }
70
+ })
71
+
72
+ mainWindow.loadFile('index.html')
73
+
74
+ mainWindow.on('closed', () => {
75
+ mainWindow = null
76
+ })
77
+ }
78
+
79
+ // IPC Handlers
80
+ ipcMain.handle('get-app-version', () => {
81
+ return app.getVersion()
82
+ })
83
+
84
+ ipcMain.on('window-minimize', () => {
85
+ if (mainWindow) {
86
+ mainWindow.minimize()
87
+ }
88
+ })
89
+
90
+ app.whenReady().then(() => {
91
+ createWindow()
92
+ })
93
+
94
+ app.on('window-all-closed', () => {
95
+ if (process.platform !== 'darwin') {
96
+ app.quit()
97
+ }
98
+ })
99
+
100
+ app.on('activate', () => {
101
+ if (BrowserWindow.getAllWindows().length === 0) {
102
+ createWindow()
103
+ }
104
+ })
105
+ ```
@@ -0,0 +1,84 @@
1
+ # Preload Script Template | Preload 脚本模板
2
+
3
+ ## Basic Preload Script
4
+
5
+ ```javascript
6
+ // preload.js
7
+ const { contextBridge, ipcRenderer } = require('electron')
8
+
9
+ // Expose protected methods to renderer
10
+ contextBridge.exposeInMainWorld('electronAPI', {
11
+ // Get app version
12
+ getVersion: () => ipcRenderer.invoke('get-app-version'),
13
+
14
+ // Window controls
15
+ minimize: () => ipcRenderer.send('window-minimize'),
16
+ maximize: () => ipcRenderer.send('window-maximize'),
17
+ close: () => ipcRenderer.send('window-close'),
18
+
19
+ // File operations
20
+ openFile: () => ipcRenderer.invoke('dialog:openFile'),
21
+ saveFile: (data) => ipcRenderer.invoke('dialog:saveFile', data),
22
+
23
+ // Listen to main process
24
+ onUpdateAvailable: (callback) => {
25
+ ipcRenderer.on('update-available', (event, data) => callback(data))
26
+ },
27
+
28
+ // Remove listeners
29
+ removeAllListeners: (channel) => {
30
+ ipcRenderer.removeAllListeners(channel)
31
+ }
32
+ })
33
+ ```
34
+
35
+ ## Advanced Preload Script
36
+
37
+ ```javascript
38
+ // preload.js
39
+ const { contextBridge, ipcRenderer } = require('electron')
40
+
41
+ // Expose API with error handling
42
+ contextBridge.exposeInMainWorld('electronAPI', {
43
+ // Safe IPC invoke
44
+ invoke: async (channel, ...args) => {
45
+ const validChannels = [
46
+ 'get-app-version',
47
+ 'dialog:openFile',
48
+ 'dialog:saveFile'
49
+ ]
50
+
51
+ if (validChannels.includes(channel)) {
52
+ return await ipcRenderer.invoke(channel, ...args)
53
+ }
54
+ throw new Error(`Invalid channel: ${channel}`)
55
+ },
56
+
57
+ // Safe IPC send
58
+ send: (channel, ...args) => {
59
+ const validChannels = [
60
+ 'window-minimize',
61
+ 'window-maximize',
62
+ 'window-close'
63
+ ]
64
+
65
+ if (validChannels.includes(channel)) {
66
+ ipcRenderer.send(channel, ...args)
67
+ }
68
+ },
69
+
70
+ // Safe event listener
71
+ on: (channel, callback) => {
72
+ const validChannels = ['update-available', 'app-version']
73
+
74
+ if (validChannels.includes(channel)) {
75
+ ipcRenderer.on(channel, (event, ...args) => callback(...args))
76
+ }
77
+ },
78
+
79
+ // Remove listener
80
+ removeListener: (channel, callback) => {
81
+ ipcRenderer.removeListener(channel, callback)
82
+ }
83
+ })
84
+ ```
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: electron-egg
3
+ description: "Build desktop applications with the Electron EGG framework, covering project setup, main/renderer process communication, window management, plugin system, and build/packaging. Use when the user asks about Electron EGG, electron-egg, needs to create Electron applications with EGG, or work with Electron EGG patterns."
4
+ license: Complete terms in LICENSE.txt
5
+ ---
6
+
7
+ ## When to use this skill
8
+
9
+ Use this skill whenever the user wants to:
10
+ - Install and set up Electron EGG in a project
11
+ - Create Electron desktop applications
12
+ - Use Electron EGG core features
13
+ - Configure Electron EGG
14
+ - Handle main process and renderer process communication
15
+ - Use Electron EGG API methods
16
+ - Build and package Electron applications
17
+ - Troubleshoot Electron EGG issues
18
+
19
+ ## How to use this skill
20
+
21
+ This skill is organized to match the Electron EGG official documentation structure (https://www.kaka996.com/, https://www.kaka996.com/pages/987b1c/, https://www.kaka996.com/pages/a99b72/). When working with Electron EGG:
22
+
23
+ 1. **Identify the topic** from the user's request:
24
+ - Installation/安装 → `examples/guide/installation.md`
25
+ - Quick Start/快速开始 → `examples/guide/quick-start.md`
26
+ - Features/功能特性 → `examples/features/`
27
+ - API/API 文档 → `api/`
28
+
29
+ 2. **Load the appropriate example file** from the `examples/` directory:
30
+
31
+ **Guide (使用文档)**:
32
+ - `examples/guide/intro.md` - Introduction to Electron EGG
33
+ - `examples/guide/installation.md` - Installation guide
34
+ - `examples/guide/quick-start.md` - Quick start guide
35
+ - `examples/guide/project-structure.md` - Project structure
36
+ - `examples/guide/configuration.md` - Configuration
37
+ - `examples/guide/build.md` - Build and package
38
+
39
+ **Features (功能特性)**:
40
+ - `examples/features/main-process.md` - Main process
41
+ - `examples/features/renderer-process.md` - Renderer process
42
+ - `examples/features/ipc-communication.md` - IPC communication
43
+ - `examples/features/window-management.md` - Window management
44
+ - `examples/features/menu.md` - Menu
45
+ - `examples/features/tray.md` - System tray
46
+ - `examples/features/auto-updater.md` - Auto updater
47
+ - `examples/features/plugin-system.md` - Plugin system
48
+
49
+ 3. **Follow the specific instructions** in that example file for syntax, structure, and best practices
50
+
51
+ **Important Notes**:
52
+ - Electron EGG is based on Electron and Egg.js
53
+ - Main process and renderer process separation
54
+ - IPC communication between processes
55
+ - Each example file includes key concepts, code examples, and key points
56
+
57
+ 4. **Reference API documentation** in the `api/` directory when needed:
58
+ - `api/main-api.md` - Main process API
59
+ - `api/renderer-api.md` - Renderer process API
60
+ - `api/ipc-api.md` - IPC API
61
+ - `api/window-api.md` - Window API
62
+ - `api/config-api.md` - Configuration API
63
+
64
+ **API Files:**
65
+ - `api/main-api.md` - Application class, BrowserWindow, ipcMain, app methods
66
+ - `api/renderer-api.md` - ipcRenderer, contextBridge, DOM APIs
67
+ - `api/ipc-api.md` - IPC communication methods and events
68
+ - `api/window-api.md` - Window creation and management
69
+ - `api/config-api.md` - Configuration options and environment variables
70
+
71
+ 5. **Use templates** from the `templates/` directory:
72
+ - `templates/installation.md` - Installation templates
73
+ - `templates/project-setup.md` - Project setup templates
74
+ - `templates/configuration.md` - Configuration templates
75
+
76
+ ### 1. Understanding Electron EGG
77
+
78
+ Electron EGG is a desktop application development framework based on Electron and Egg.js, providing a complete development toolchain and best practices.
79
+
80
+ **Key Concepts**:
81
+ - **Electron**: Cross-platform desktop application framework
82
+ - **Egg.js**: Node.js enterprise application framework
83
+ - **Main Process**: Main application process
84
+ - **Renderer Process**: UI rendering process
85
+ - **IPC**: Inter-process communication
86
+ - **Plugin System**: Extensible plugin architecture
87
+
88
+ ### 2. Installation
89
+
90
+ **Using npm**:
91
+
92
+ ```bash
93
+ npm install electron-egg
94
+ ```
95
+
96
+ **Using yarn**:
97
+
98
+ ```bash
99
+ yarn add electron-egg
100
+ ```
101
+
102
+ **Using pnpm**:
103
+
104
+ ```bash
105
+ pnpm add electron-egg
106
+ ```
107
+
108
+ ### 3. Basic Setup
109
+
110
+ ```javascript
111
+ // main.js
112
+ const { Application } = require('electron-egg')
113
+
114
+ const app = new Application({
115
+ // Configuration
116
+ })
117
+
118
+ app.start()
119
+ ```
120
+
121
+
122
+ ### Doc mapping (one-to-one with official documentation)
123
+
124
+ - `examples/` → https://www.kaka996.com/pages/987b1c/
125
+ - `api/` → https://www.kaka996.com/pages/a99b72/
126
+
127
+ ## API Reference (`api/`)
128
+
129
+ - `api/main-api.md` - Application class, BrowserWindow, ipcMain, lifecycle hooks
130
+ - `api/renderer-api.md` - ipcRenderer, contextBridge, DOM APIs
131
+ - `api/ipc-api.md` - IPC communication methods and channels
132
+ - `api/window-api.md` - Window creation, management, events
133
+ - `api/config-api.md` - Configuration options and environment variables
134
+
135
+ ## Best Practices
136
+
137
+ 1. **Separate processes**: Keep main process and renderer process code separate
138
+ 2. **Use IPC**: Use IPC for inter-process communication
139
+ 3. **Handle errors**: Properly handle errors in both processes
140
+ 4. **Security**: Follow Electron security best practices
141
+ 5. **Performance**: Optimize application performance
142
+ 6. **Build configuration**: Configure build and package properly
143
+ 7. **Plugin system**: Use plugin system for extensibility
144
+
145
+ ## Resources
146
+
147
+ - **Official Documentation**: https://www.kaka996.com/
148
+ - **Usage Guide**: https://www.kaka996.com/pages/987b1c/
149
+ - **API Documentation**: https://www.kaka996.com/pages/a99b72/
150
+ - **Gitee Repository**: https://gitee.com/dromara/electron-egg
151
+
152
+ ## Keywords
153
+
154
+ Electron EGG, electron-egg, Electron, Egg.js, desktop application, 桌面应用, 主进程, 渲染进程, IPC, 进程间通信, 窗口管理, 菜单, 系统托盘, 自动更新, 插件系统, main process, renderer process, inter-process communication, window management, menu, system tray, auto updater, plugin system
@@ -0,0 +1,62 @@
1
+ # Configuration API
2
+
3
+ ## API Reference
4
+
5
+ Electron EGG configuration API.
6
+
7
+ ### Configuration Files
8
+
9
+ Configuration files are in the `config/` directory:
10
+ - `config.default.js` - Default configuration
11
+ - `config.local.js` - Local development configuration
12
+ - `config.prod.js` - Production configuration
13
+
14
+ ### App Info Configuration
15
+
16
+ ```javascript
17
+ appInfo: {
18
+ name: string, // App name
19
+ baseDir: string, // Base directory
20
+ env: string, // Environment
21
+ home: string, // Home directory
22
+ root: string, // Root directory
23
+ appUserDataDir: string // User data directory
24
+ }
25
+ ```
26
+
27
+ ### Window Configuration
28
+
29
+ ```javascript
30
+ mainWindow: {
31
+ width: number, // Window width
32
+ height: number, // Window height
33
+ minWidth: number, // Minimum width
34
+ minHeight: number, // Minimum height
35
+ title: string, // Window title
36
+ frame: boolean, // Show frame
37
+ transparent: boolean // Transparent window
38
+ }
39
+ ```
40
+
41
+ ### Plugin Configuration
42
+
43
+ ```javascript
44
+ addons: {
45
+ tray: {
46
+ enable: boolean // Enable system tray
47
+ },
48
+ security: {
49
+ enable: boolean // Enable security
50
+ },
51
+ autoUpdater: {
52
+ enable: boolean // Enable auto updater
53
+ }
54
+ }
55
+ ```
56
+
57
+ ### Environment Variables
58
+
59
+ - `NODE_ENV` - Node environment
60
+ - `ELECTRON_EGG_ENV` - Electron EGG environment
61
+
62
+ **See also:** `examples/guide/configuration.md` for detailed examples
@@ -0,0 +1,55 @@
1
+ # IPC API
2
+
3
+ ## API Reference
4
+
5
+ Electron EGG IPC communication API.
6
+
7
+ ### Main Process (ipcMain)
8
+
9
+ **ipcMain.on(channel, listener)**
10
+ - Listen for IPC messages from renderer
11
+
12
+ **ipcMain.once(channel, listener)**
13
+ - Listen for IPC message once
14
+
15
+ **ipcMain.handle(channel, listener)**
16
+ - Handle IPC requests (async)
17
+
18
+ **ipcMain.removeListener(channel, listener)**
19
+ - Remove IPC listener
20
+
21
+ **ipcMain.removeAllListeners(channel)**
22
+ - Remove all listeners for channel
23
+
24
+ ### Renderer Process (ipcRenderer)
25
+
26
+ **ipcRenderer.send(channel, ...args)**
27
+ - Send message to main process
28
+
29
+ **ipcRenderer.sendSync(channel, ...args)**
30
+ - Send synchronous message to main process
31
+
32
+ **ipcRenderer.on(channel, listener)**
33
+ - Listen for IPC messages from main
34
+
35
+ **ipcRenderer.once(channel, listener)**
36
+ - Listen for IPC message once
37
+
38
+ **ipcRenderer.invoke(channel, ...args)**
39
+ - Invoke handler in main process (async)
40
+
41
+ **ipcRenderer.removeListener(channel, listener)**
42
+ - Remove IPC listener
43
+
44
+ ### Event Object
45
+
46
+ **event.sender**
47
+ - WebContents that sent the message
48
+
49
+ **event.reply(channel, ...args)**
50
+ - Reply to sender
51
+
52
+ **event.returnValue**
53
+ - Return value for synchronous messages
54
+
55
+ **See also:** `examples/features/ipc-communication.md` for detailed examples