Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 1 gada
1234567891011121314151617181920212223242526272829303132
  1. const Path = require('path');
  2. const Chalk = require('chalk');
  3. const FileSystem = require('fs');
  4. const Vite = require('vite');
  5. const compileTs = require('./private/tsc');
  6. function buildRenderer() {
  7. return Vite.build({
  8. configFile: Path.join(__dirname, '..', 'vite.config.js'),
  9. base: './',
  10. mode: 'production'
  11. });
  12. }
  13. function buildMain() {
  14. const mainPath = Path.join(__dirname, '..', 'src', 'main');
  15. return compileTs(mainPath);
  16. }
  17. FileSystem.rmSync(Path.join(__dirname, '..', 'build'), {
  18. recursive: true,
  19. force: true,
  20. })
  21. console.log(Chalk.blueBright('Transpiling renderer & main...'));
  22. Promise.allSettled([
  23. buildRenderer(),
  24. buildMain(),
  25. ]).then(() => {
  26. console.log(Chalk.greenBright('Renderer & main successfully transpiled! (ready to be built with electron-builder)'));
  27. });