Skip to content

Commit d79811d

Browse files
author
Christopher Willis-Ford
committed
make build-gui script work on all platforms
1 parent 48964e6 commit d79811d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "BSD-3-Clause",
88
"scripts": {
99
"start": "electron-webpack dev --bail --display-error-details --env.minify=false",
10-
"build-gui": "cd ./node_modules/scratch-gui && BUILD_MODE=dist STATIC_PATH=static npm run build",
10+
"build-gui": "node ./scripts/build-gui.js",
1111
"clean": "rimraf ./dist/ ./static/assets/",
1212
"compile": "rimraf ./dist/ && electron-webpack --bail --display-error-details --env.minify=false",
1313
"fetch": "rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMediaLibraryAssets.js",

scripts/build-gui.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const childProcess = require('child_process');
2+
const path = require('path');
3+
4+
childProcess.spawnSync(
5+
'npm', ['run', 'build'],
6+
{
7+
cwd: path.join('node_modules', 'scratch-gui'),
8+
env: {
9+
BUILD_MODE: 'dist',
10+
STATIC_PATH: 'static'
11+
},
12+
shell: true,
13+
stdio: 'inherit'
14+
}
15+
);

0 commit comments

Comments
 (0)