ee-core 2.2.0-beta.4 → 2.2.0

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.
package/README.md CHANGED
@@ -1,5 +1,63 @@
1
- ## ee-core
2
- A simple, cross-platform, enterprise-level desktop software development framework
1
+ ### introduction
3
2
 
4
- ## document
5
- [Quick Start](https://www.kaka996.com/pages/85c531/)
3
+ You can use ee core as a **module**, see more: [introduction](https://www.kaka996.com/pages/1dbe35/)
4
+ [中文文档](https://www.kaka996.com/pages/1dbe35/)
5
+
6
+ ### module list
7
+
8
+ #### addon
9
+ plug-in module
10
+
11
+ #### bin
12
+ Command line module.
13
+
14
+ #### config
15
+ Configuration Module
16
+
17
+ #### const
18
+ Define the universal constants used in the framework.
19
+
20
+ #### controller
21
+ Controller module
22
+
23
+ #### ee
24
+ EE module
25
+
26
+ #### electron
27
+ The electric function encapsulated by the framework will provide APIs in this module.
28
+
29
+ #### exception
30
+ Capture exception modules.
31
+
32
+ #### httpclient
33
+ HTTP client.
34
+
35
+ #### jobs
36
+ Jobs module.
37
+
38
+ #### loader
39
+ loader module
40
+
41
+ #### log
42
+ log module
43
+
44
+ #### message
45
+ Message module. Sending messages between the main process and child processes.
46
+
47
+ #### ps
48
+ Process tool class module.
49
+
50
+ #### services
51
+ services module
52
+
53
+ #### socket
54
+ Provide socket communication function.
55
+
56
+ #### storage
57
+ Storage module. Provide JSON database and sqlite database.
58
+
59
+ #### tools
60
+ Script module. Encrypt and move resources.
61
+
62
+ #### utils
63
+ Tool library module.
package/ee/application.js CHANGED
@@ -11,6 +11,10 @@ class Appliaction extends EeApp {
11
11
  constructor() {
12
12
  Exception.start();
13
13
  const { env } = process;
14
+
15
+ // initialize mode
16
+ Ps.initMode();
17
+
14
18
  let options = {
15
19
  env: 'prod',
16
20
  serverScope: '',
package/main/index.js CHANGED
@@ -21,7 +21,7 @@ class ElectronEgg {
21
21
  if (!Ps.verifyMode(this.mode)) {
22
22
  throw new Error(`The mode supports only (framework | module) !`);
23
23
  }
24
- process.env.EE_MODE = this.mode;
24
+ Ps.initMode(this.mode);
25
25
 
26
26
  // module mode
27
27
  if (Ps.isModuleMode()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ee-core",
3
- "version": "2.2.0-beta.4",
3
+ "version": "2.2.0",
4
4
  "description": "ee core",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/ps/index.js CHANGED
@@ -1,6 +1,14 @@
1
1
  const path = require('path');
2
2
  const eis = require('../utils/is');
3
3
 
4
+ /**
5
+ * 初始化模式
6
+ */
7
+ exports.initMode = function(mode) {
8
+ // process.env.EE_MODE === undefined
9
+ return process.env.EE_MODE = mode ? mode : 'framework';
10
+ }
11
+
4
12
  /**
5
13
  * 当前模式 - framework | module
6
14
  */