ee-core 2.2.0-beta.4 → 2.2.0-beta.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.
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-beta.5",
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
  */