bin.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /**
  2. * ee-bin 配置
  3. * 仅适用于开发环境
  4. */
  5. module.exports = {
  6. /**
  7. * development serve ("frontend" "electron" )
  8. * ee-bin dev
  9. */
  10. dev: {
  11. frontend: {
  12. directory: './frontend',
  13. cmd: 'npm',
  14. args: ['run', 'dev'],
  15. protocol: 'http://',
  16. hostname: 'localhost',
  17. port: 8080,
  18. indexPath: 'index.html'
  19. },
  20. electron: {
  21. directory: './',
  22. cmd: 'electron',
  23. args: ['.', '--env=local'],
  24. }
  25. },
  26. /**
  27. * 前端构建
  28. * ee-bin build
  29. */
  30. build: {
  31. directory: './frontend',
  32. cmd: 'npm',
  33. args: ['run', 'build'],
  34. },
  35. /**
  36. * 移动资源
  37. * ee-bin rd
  38. */
  39. rd: {
  40. dist: './frontend/dist',
  41. target: './public/dist'
  42. },
  43. /**
  44. * 预发布模式(prod)
  45. * ee-bin start
  46. */
  47. start: {
  48. directory: './',
  49. cmd: 'electron',
  50. args: ['.', '--env=prod']
  51. },
  52. /**
  53. * 加密
  54. */
  55. encrypt: {
  56. type: 'confusion',
  57. files: [
  58. 'electron/**/*.(js|json)',
  59. '!electron/config/encrypt.js',
  60. '!electron/config/nodemon.json',
  61. '!electron/config/builder.json',
  62. '!electron/config/bin.json',
  63. ],
  64. fileExt: ['.js'],
  65. confusionOptions: {
  66. compact: true,
  67. stringArray: true,
  68. stringArrayEncoding: ['none'],
  69. deadCodeInjection: false,
  70. }
  71. }
  72. };