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.
- package/package.json +1 -1
- package/tools/encrypt.js +4 -3
package/package.json
CHANGED
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',
|
|
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
|
-
|
|
250
|
+
|
|
251
|
+
return ret || {};
|
|
251
252
|
};
|
|
252
253
|
|
|
253
254
|
md5 (file) {
|