Skip to content

Commit d37de95

Browse files
author
Christopher Willis-Ford
committed
Document scratch-gui STATIC_PATH build parameter
1 parent e389901 commit d37de95

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,19 @@ that repository's main development line. For now, though, there's a separate bra
1111

1212
1. Clone the `scratch-gui` repository if you haven't already.
1313
2. Switch to the `scratch-desktop` branch with `git checkout scratch-desktop`
14-
3. Build with `BUILD_MODE=dist`:
15-
- macOS, WSL, or Cygwin: run `BUILD_MODE=dist npm run build` or `BUILD_MODE=dist npm run watch`
16-
- CMD: run `set BUILD_MODE=dist` once, then `npm run build` or `npm run watch` any number of times in the same
14+
3. Build with `BUILD_MODE=dist` and `STATIC_PATH=static`:
15+
- macOS, WSL, or Cygwin: run `BUILD_MODE=dist STATIC_PATH=static npm run build` or
16+
`BUILD_MODE=dist STATIC_PATH=static npm run watch`
17+
- Running `npm run build-gui` in `scratch-desktop` is a shortcut for this when using `npm link`.
18+
- CMD: run `set BUILD_MODE=dist` once and `set STATIC_PATH=static` once, then `npm run build` or `npm run watch`
19+
any number of times in the same
1720
window.
18-
- PowerShell: run `$env:BUILD_MODE = "dist"` once, then `npm run build` or `npm run watch` any number of times in
19-
the same window.
21+
- PowerShell: run `$env:BUILD_MODE = "dist"` once and `$env:STATIC_PATH = "static"` once, then `npm run build` or
22+
`npm run watch` any number of times in the same window.
23+
24+
If you have run `npm link scratch-gui` (or equivalent) in the `scratch-desktop` working directory, you may be able to
25+
accomplish the above by running `npm run build-gui` in the `scratch-desktop` directory instead of using the manual
26+
steps listed above.
2027

2128
### Prepare media library assets
2229

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +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",
1011
"clean": "rimraf ./dist/ ./static/assets/",
1112
"compile": "rimraf ./dist/ && electron-webpack --bail --display-error-details --env.minify=false",
1213
"fetch": "rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMediaLibraryAssets.js",

0 commit comments

Comments
 (0)