Skip to content

Commit

Permalink
Update CheckBuiltsExists to include worker bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewWalsh committed Apr 16, 2018
1 parent 5cec1ab commit 65c6f02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internals/scripts/CheckBuiltsExist.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import fs from 'fs';
function CheckBuildsExist() {
const mainPath = path.join(__dirname, '..', '..', 'app', 'main.prod.js');
const rendererPath = path.join(__dirname, '..', '..', 'app', 'renderer', 'dist', 'renderer.prod.js');
const workerPath = path.join(__dirname, '..', '..', 'app', 'worker', 'dist', 'worker.prod.js');

if (!fs.existsSync(mainPath)) {
throw new Error(chalk.whiteBright.bgRed.bold('The main process is not built yet. Build it by running "npm run build-main"'));
Expand All @@ -15,6 +16,10 @@ function CheckBuildsExist() {
if (!fs.existsSync(rendererPath)) {
throw new Error(chalk.whiteBright.bgRed.bold('The renderer process is not built yet. Build it by running "npm run build-renderer"'));
}

if (!fs.existsSync(workerPath)) {
throw new Error(chalk.whiteBright.bgRed.bold('The worker process is not built yet. Build it by running "npm run build-renderer"'));
}
}

CheckBuildsExist();

0 comments on commit 65c6f02

Please sign in to comment.