ee-core 1.3.0-beta.1 → 1.3.0-beta.2

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.
@@ -245,17 +245,6 @@ module.exports = appInfo => {
245
245
  */
246
246
  config.hardGpu = {
247
247
  enable: false
248
- };
249
-
250
- /**
251
- * 加密配置
252
- */
253
- config.encrypt = {
254
- type: 'bytecode', // bytecode | confusion
255
- directory: [
256
- 'electron'
257
- ],
258
- fileExt: ['.js'],
259
248
  };
260
249
 
261
250
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ee-core",
3
- "version": "1.3.0-beta.1",
3
+ "version": "1.3.0-beta.2",
4
4
  "description": "ee core",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tools/encrypt.js CHANGED
@@ -21,11 +21,13 @@ class Encrypt {
21
21
  this.tmpFile = '';
22
22
  this.mapFile = '';
23
23
 
24
- // argv
25
- for (let i = 0; i < process.argv.length; i++) {
26
- let tmpArgv = process.argv[i];
27
- if (tmpArgv.indexOf('--type=') !== -1) {
28
- this.type = tmpArgv.substring(7);
24
+ // cli
25
+ if (Object.keys(this.config).length == 0) {
26
+ for (let i = 0; i < process.argv.length; i++) {
27
+ let tmpArgv = process.argv[i];
28
+ if (tmpArgv.indexOf('--type=') !== -1) {
29
+ this.type = tmpArgv.substring(7);
30
+ }
29
31
  }
30
32
  }
31
33
 
@@ -150,8 +152,8 @@ class Encrypt {
150
152
  },
151
153
  }
152
154
  let options = defaultOpt;
153
- if (is.object(this.config)) {
154
- options = Object.assign(defaultOpt, this.config);
155
+ if (is.object(this.config.uglifyOpt)) {
156
+ options = Object.assign(defaultOpt, this.config.uglifyOpt);
155
157
  }
156
158
 
157
159
  let code = fs.readFileSync(file, "utf8");