From 12f36aadb86a08c09f77664c283f82f1770097ec Mon Sep 17 00:00:00 2001 From: Johan Winther Date: Wed, 1 Nov 2023 19:43:55 +0100 Subject: [PATCH 1/2] Readme update Add hint in quote block to avoid confusion with the instructions. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa7b537..9c1576b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This is the UI you see when you type `ui` into `ucm`. ## Running Development Server -🔔 You should only need to run the UI development server if you're contributing to the UI. If you just want to run the UI to see your Unison codebase, it should either come pre-installed with `ucm` or if you built from source can be downloaded with a script: `./dev-ui-install.hs` from the `unison` repository ([Running Unison](https://github.com/unisonweb/unison/blob/trunk/development.markdown#running-unison)). +> 🔔 You should only need to run the UI development server if you're contributing to the UI. If you just want to run the UI to see your Unison codebase, it should either come pre-installed with `ucm` or if you built from source it can be downloaded with a script: `./dev-ui-install.hs` from the `unison` repository ([Running Unison](https://github.com/unisonweb/unison/blob/trunk/development.markdown#running-unison)). 1. Start `ucm` (the executable is `unison` instead of `ucm` if you built the [unison repository](https://github.com/unisonweb/unison) from source) in headless mode: `ucm headless`, and copy the API URL (this URL is uniquely generated by `ucm` at start-up) from the `ucm` start-up output From 1c4ad069f0f13b5893f03cebc1bb5a57cd7b822a Mon Sep 17 00:00:00 2001 From: Johan Winther Date: Wed, 1 Nov 2023 19:44:46 +0100 Subject: [PATCH 2/2] Add support for ELM_DEBUG env var --- README.md | 2 ++ webpack.dev.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c1576b..036debc 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ This is the UI you see when you type `ui` into `ucm`. 4. Visit `http://localhost:1234` in a browser. +> 💡 Set the environment variable `ELM_DEBUG=1` before starting the dev server to enable Elm's time-travelling debugger. + ## Dependencies This depends on the [ui-core package](https://github.com/unisonweb/ui-core) via diff --git a/webpack.dev.js b/webpack.dev.js index b352672..f8b4b33 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -4,6 +4,7 @@ const postcssPresetEnv = require("postcss-preset-env"); const FaviconsWebpackPlugin = require("favicons-webpack-plugin"); const API_URL = process.env.API_URL || "127.0.0.1:8080"; +const ELM_DEBUG = process.env.ELM_DEBUG || false; const UI_CORE_SRC = "elm-stuff/gitdeps/github.com/unisonweb/ui-core/src"; module.exports = { @@ -63,7 +64,7 @@ module.exports = { { loader: "elm-webpack-loader", options: { - debug: false, + debug: ELM_DEBUG, cwd: __dirname, }, },