config.js 967 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. 'use strict';
  2. const path = require('path');
  3. const dayjs = require('dayjs');
  4. exports.get = function () {
  5. const _config = {
  6. log: {
  7. file: {
  8. fileName: path.join(__dirname, '../logs/electron-' + dayjs().format('YYYY-MM-DD') + '.log'),
  9. level: 'silly', // error, warn, info, verbose, debug, silly
  10. format: '[{y}-{m}-{d} {h}:{i}:{s}.{ms}] [{level}] {text}',
  11. maxSize: '1048576' // 1048576 (1mb) by default.
  12. }
  13. },
  14. windowsOption: {
  15. width: 800,
  16. height: 600,
  17. minWidth: 800,
  18. minHeight: 600,
  19. webPreferences: {
  20. //webSecurity: false,
  21. nodeIntegration: true,
  22. preload: path.join(__dirname, 'preload.js')
  23. },
  24. //frame: false,
  25. //titleBarStyle: 'hidden'
  26. },
  27. egg: {
  28. title: 'electron-egg',
  29. env: 'prod',
  30. port: 7068,
  31. workers: 1
  32. }
  33. }
  34. return _config;
  35. };
  36. exports.setup = function () {
  37. return true;
  38. };
  39. exports = module.exports;