encrypt.js 864 B

12345678910111213141516171819202122
  1. /**
  2. * 加密配置
  3. * @param {String} type - bytecode || confusion || strict (first confusion and then bytecode)
  4. * @param {Array} directory - directory to be encrypted
  5. * @param {Array} fileExt - file suffix to be encrypted, currently only .js is supported
  6. * @param {Array} confusionOptions options
  7. */
  8. module.exports = {
  9. type: 'confusion',
  10. directory: [
  11. 'electron'
  12. ],
  13. fileExt: ['.js'],
  14. confusionOptions: {
  15. compact: true, // 将代码压缩为1行
  16. stringArray: true, // 删除字符串文本并将其放置在特殊数组中
  17. stringArrayEncoding: ['none'], // 对stringArray编码 'none', 'base64', 'rc4',注意:会增加代码大小,降低运行速度
  18. disableConsoleOutput: true, // 禁止console输出
  19. deadCodeInjection: false, // 是否注入死代码
  20. debugProtection: false // 是否允许debug代码
  21. }
  22. };