diff --git a/README.md b/README.md index aa7b537..036debc 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 @@ -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, }, },