mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-12-22 21:52:31 -05:00
Document scratch-gui STATIC_PATH build parameter
This commit is contained in:
parent
e389901997
commit
d37de9555d
2 changed files with 13 additions and 5 deletions
17
README.md
17
README.md
|
@ -11,12 +11,19 @@ that repository's main development line. For now, though, there's a separate bra
|
||||||
|
|
||||||
1. Clone the `scratch-gui` repository if you haven't already.
|
1. Clone the `scratch-gui` repository if you haven't already.
|
||||||
2. Switch to the `scratch-desktop` branch with `git checkout scratch-desktop`
|
2. Switch to the `scratch-desktop` branch with `git checkout scratch-desktop`
|
||||||
3. Build with `BUILD_MODE=dist`:
|
3. Build with `BUILD_MODE=dist` and `STATIC_PATH=static`:
|
||||||
- macOS, WSL, or Cygwin: run `BUILD_MODE=dist npm run build` or `BUILD_MODE=dist npm run watch`
|
- macOS, WSL, or Cygwin: run `BUILD_MODE=dist STATIC_PATH=static npm run build` or
|
||||||
- CMD: run `set BUILD_MODE=dist` once, then `npm run build` or `npm run watch` any number of times in the same
|
`BUILD_MODE=dist STATIC_PATH=static npm run watch`
|
||||||
|
- Running `npm run build-gui` in `scratch-desktop` is a shortcut for this when using `npm link`.
|
||||||
|
- CMD: run `set BUILD_MODE=dist` once and `set STATIC_PATH=static` once, then `npm run build` or `npm run watch`
|
||||||
|
any number of times in the same
|
||||||
window.
|
window.
|
||||||
- PowerShell: run `$env:BUILD_MODE = "dist"` once, then `npm run build` or `npm run watch` any number of times in
|
- PowerShell: run `$env:BUILD_MODE = "dist"` once and `$env:STATIC_PATH = "static"` once, then `npm run build` or
|
||||||
the same window.
|
`npm run watch` any number of times in the same window.
|
||||||
|
|
||||||
|
If you have run `npm link scratch-gui` (or equivalent) in the `scratch-desktop` working directory, you may be able to
|
||||||
|
accomplish the above by running `npm run build-gui` in the `scratch-desktop` directory instead of using the manual
|
||||||
|
steps listed above.
|
||||||
|
|
||||||
### Prepare media library assets
|
### Prepare media library assets
|
||||||
|
|
||||||
|
|
|
@ -7,6 +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",
|
||||||
"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",
|
||||||
|
|
Loading…
Reference in a new issue