ee-core 1.3.0 → 1.3.1

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/package.json +1 -1
  2. package/tools/encrypt.js +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ee-core",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "ee core",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tools/encrypt.js CHANGED
@@ -14,7 +14,7 @@ class Encrypt {
14
14
  this.basePath = process.cwd();
15
15
  this.dirs = [];
16
16
  this.encryptCodeDir = path.join(this.basePath, 'public');
17
- this.config = this.loadConfig('encrypt');
17
+ this.config = this.loadConfig('encrypt.js');
18
18
  this.filesExt = this.config.fileExt || ['.js'];
19
19
  this.type = this.config.type || 'bytecode';
20
20
  const directory = this.config.directory || ['electron'];
@@ -239,7 +239,7 @@ class Encrypt {
239
239
  };
240
240
 
241
241
  loadConfig (prop) {
242
- const filepath = path.join(this.basePath, 'electron', 'config', 'config.default.js');
242
+ const filepath = path.join(this.basePath, 'electron', 'config', prop);
243
243
  const obj = require(filepath);
244
244
  if (!obj) return obj;
245
245
 
@@ -247,7 +247,8 @@ class Encrypt {
247
247
  if (is.function(obj) && !is.class(obj)) {
248
248
  ret = obj();
249
249
  }
250
- return ret[prop] || {};
250
+
251
+ return ret || {};
251
252
  };
252
253
 
253
254
  md5 (file) {