From 86beb6ebf177fbaaa85ae928ad73a4a5f487d216 Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Tue, 18 Mar 2025 14:39:02 -0400 Subject: [PATCH] Improve local setup instructions (#5860) * Fix overwrite confirmation on existing wasm-pack * Recommend using local .env for overrides --- README.md | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 59fe791a8..36d22c668 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ Finally, to run the web app only, run: yarn start ``` -If you're not a Zoo employee you won't be able to access the dev environment, you should copy everything from `.env.production` to `.env.development` to make it point to production instead, then when you navigate to `localhost:3000` the easiest way to sign in is to paste `localStorage.setItem('TOKEN_PERSIST_KEY', "your-token-from-https://zoo.dev/account/api-tokens")` replacing the with a real token from https://zoo.dev/account/api-tokens of course, then navigate to localhost:3000 again. Note that navigating to `localhost:3000/signin` removes your token so you will need to set the token again. +If you're not a Zoo employee you won't be able to access the dev environment, you should copy everything from `.env.production` to `.env.development.local` to make it point to production instead, then when you navigate to `localhost:3000` the easiest way to sign in is to paste `localStorage.setItem('TOKEN_PERSIST_KEY', "your-token-from-https://zoo.dev/account/api-tokens")` replacing the with a real token from https://zoo.dev/account/api-tokens of course, then navigate to `localhost:3000` again. Note that navigating to `localhost:3000/signin` removes your token so you will need to set the token again. ### Development environment variables @@ -122,7 +122,7 @@ Third-Party Cookies". ## Desktop -To spin up the desktop app, `yarn install` and `yarn build:wasm` need to have been done before hand then +To spin up the desktop app, `yarn install` and `yarn build:wasm` need to have been done before hand then: ``` yarn tron:start @@ -130,13 +130,13 @@ yarn tron:start This will start the application and hot-reload on changes. -Devtools can be opened with the usual Cmd-Opt-I (Mac) or Ctrl-Shift-I (Linux and Windows). +Devtools can be opened with the usual Command-Option-I (macOS) or Ctrl-Shift-I (Linux and Windows). -To package the app for your platform with electron-builder, run `yarn tronb:package:dev` (or `yarn tronb:package:prod` to point to the .env.production variables) +To package the app for your platform with electron-builder, run `yarn tronb:package:dev` (or `yarn tronb:package:prod` to point to the .env.production variables). ## Checking out commits / Bisecting -Which commands from setup are one off vs need to be run every time? +Which commands from setup are one off vs. need to be run every time? The following will need to be run when checking out a new commit and guarantees the build is not stale: diff --git a/package.json b/package.json index 025a64d2c..031bcaee0 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "scripts": { "install:rust": "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none && source \"$HOME/.cargo/env\" && (cd rust && (rustup show active-toolchain || rustup toolchain install))", "install:rust:windows": "winget install Microsoft.VisualStudio.2022.Community --silent --override \"--wait --quiet --add ProductLang En-us --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended\" && winget install Rustlang.Rustup", - "install:wasm-pack:sh": ". $HOME/.cargo/env && curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y", + "install:wasm-pack:sh": ". $HOME/.cargo/env && curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f", "install:wasm-pack:cargo": "cargo install wasm-pack", "install:tools:windows": "winget install jqlang.jq MikeFarah.yq GitHub.cli", "start": "vite --port=3000 --host=0.0.0.0",