mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-12-23 06:02:30 -05:00
make build-gui script work on all platforms
This commit is contained in:
parent
48964e616e
commit
d79811d842
2 changed files with 16 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron-webpack dev --bail --display-error-details --env.minify=false",
|
"start": "electron-webpack dev --bail --display-error-details --env.minify=false",
|
||||||
"build-gui": "cd ./node_modules/scratch-gui && BUILD_MODE=dist STATIC_PATH=static npm run build",
|
"build-gui": "node ./scripts/build-gui.js",
|
||||||
"clean": "rimraf ./dist/ ./static/assets/",
|
"clean": "rimraf ./dist/ ./static/assets/",
|
||||||
"compile": "rimraf ./dist/ && electron-webpack --bail --display-error-details --env.minify=false",
|
"compile": "rimraf ./dist/ && electron-webpack --bail --display-error-details --env.minify=false",
|
||||||
"fetch": "rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMediaLibraryAssets.js",
|
"fetch": "rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMediaLibraryAssets.js",
|
||||||
|
|
15
scripts/build-gui.js
Normal file
15
scripts/build-gui.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
const childProcess = require('child_process');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
childProcess.spawnSync(
|
||||||
|
'npm', ['run', 'build'],
|
||||||
|
{
|
||||||
|
cwd: path.join('node_modules', 'scratch-gui'),
|
||||||
|
env: {
|
||||||
|
BUILD_MODE: 'dist',
|
||||||
|
STATIC_PATH: 'static'
|
||||||
|
},
|
||||||
|
shell: true,
|
||||||
|
stdio: 'inherit'
|
||||||
|
}
|
||||||
|
);
|
Loading…
Reference in a new issue