Add crossenv to build script

This commit is contained in:
Kaloyan Manolov 2025-03-26 17:26:53 +02:00
parent b09ce5fa9f
commit df43409d53
3 changed files with 9 additions and 8 deletions

View file

@ -5,6 +5,7 @@ Scratch 3.0 as a standalone desktop application
## Developer Instructions
### Releasing a new version
# TODO: Update readme once scratch-desktop uses scratch-gui from an npm package
Let's assume that you want to make a new release, version `3.999.0`, corresponding to `scratch-gui` version
`0.1.0-prerelease.20yymmdd`.

View file

@ -7,19 +7,19 @@
"license": "AGPL-3.0-only",
"main": "./dist/main/main.js",
"scripts": {
"clean": "rimraf ./dist ./static/assets",
"clean": "rimraf ./dist ./static/fetched",
"start": "node scripts/start.js",
"compile:renderer": "webpack --config webpack.renderer.js",
"compile:main": "webpack --config webpack.main.js",
"compile": "npm run compile:renderer && npm run compile:main",
"fetch": "rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMediaLibraryAssets.js",
"fetch": "rimraf ./static/fetched/ && mkdirp ./static/fetched/ && node ./scripts/fetchMediaLibraryAssets.js",
"build": "npm run build:dev",
"build:dev": "NODE_ENV=production npm run compile && npm run doBuild -- --mode=dev",
"build:dir": "NODE_ENV=production npm run compile && npm run doBuild -- --mode=dir",
"build:dist": "NODE_ENV=production npm run compile && npm run doBuild -- --mode=dist",
"build:dev": "npx cross-env NODE_ENV=production npm run compile && npm run doBuild -- --mode=dev",
"build:dir": "npx cross-env NODE_ENV=production npm run compile && npm run doBuild -- --mode=dir",
"build:dist": "npx cross-env NODE_ENV=production npm run compile && npm run doBuild -- --mode=dist",
"doBuild": "node ./scripts/electron-builder-wrapper.js",
"dist": "npm run clean && npm run compile && npm run fetch && npm run doBuild -- --mode=dist",
"distDev": "npm run clean && npm run compile && npm run fetch && npm run doBuild -- --mode=dev",
"dist": "npm run clean && npm run fetch && npm run build:dist",
"distDev": "npm run clean && npm run fetch && npm run build:dev",
"test": "npm run test:lint",
"test:lint": "eslint --cache --color --ext .jsx,.js ."
},

View file

@ -85,7 +85,7 @@ const displayPermissionDeniedWarning = (browserWindow, permissionType) => {
* @returns {string} - an absolute URL as a string
*/
const makeFullUrl = (url, search = null) => {
const baseUrl = (isDevelopment ?
const baseUrl = (isDevelopment ?
`http://localhost:${PORT}/` :
`file://${path.join(__dirname, "../renderer")}/`
);