Document scratch-gui STATIC_PATH build parameter

This commit is contained in:
Christopher Willis-Ford 2019-05-16 20:23:30 -07:00
parent e389901997
commit d37de9555d
2 changed files with 13 additions and 5 deletions

View file

@ -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.
2. Switch to the `scratch-desktop` branch with `git checkout scratch-desktop`
3. Build with `BUILD_MODE=dist`:
- macOS, WSL, or Cygwin: run `BUILD_MODE=dist npm run build` or `BUILD_MODE=dist npm run watch`
- CMD: run `set BUILD_MODE=dist` once, then `npm run build` or `npm run watch` any number of times in the same
3. Build with `BUILD_MODE=dist` and `STATIC_PATH=static`:
- macOS, WSL, or Cygwin: run `BUILD_MODE=dist STATIC_PATH=static npm run build` or
`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.
- PowerShell: run `$env:BUILD_MODE = "dist"` once, then `npm run build` or `npm run watch` any number of times in
the same window.
- PowerShell: run `$env:BUILD_MODE = "dist"` once and `$env:STATIC_PATH = "static"` once, then `npm run build` or
`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

View file

@ -7,6 +7,7 @@
"license": "BSD-3-Clause",
"scripts": {
"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/",
"compile": "rimraf ./dist/ && electron-webpack --bail --display-error-details --env.minify=false",
"fetch": "rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMediaLibraryAssets.js",