Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
osdio committed Jun 19, 2020
1 parent 2b8e705 commit 35c6ae2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ traversing(appPath, (fPath, folderLevel, next) => {
}, './');
copyFolder('./vite-web-wallet/dist', path.join(appPath, 'walletPages'));
copyIcon();
writePackage();
!no_build && startBuild();

function formatFile(filePath, folderLevel) {
Expand Down Expand Up @@ -60,6 +61,15 @@ function formatFile(filePath, folderLevel) {
fs.writeFileSync(filePath, file.replace(/(~app\/)/g, folderLevel), 'utf8');
}

function writePackage() {
let packageFile = require('./package.json');

packageFile.main = 'main.js';
let build = require('./electron.build.json');
packageFile.build = build;
fs.writeFileSync('./app/package.json', JSON.stringify(packageFile), 'utf8');
}

function copyIcon() {
copyFolder(
path.join(__dirname, '/walletSrc/icon'),
Expand Down

0 comments on commit 35c6ae2

Please sign in to comment.