Skip to content

Commit 642b586

Browse files
authored
Merge pull request #17 from JohanWinther/elm-debug-from-env
Add support for `ELM_DEBUG` environment variable
2 parents 1b274f7 + 1c4ad06 commit 642b586

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the UI you see when you type `ui` into `ucm`.
66

77
## Running Development Server
88

9-
🔔 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)).
9+
> 🔔 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)).
1010
1111
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
1212
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`.
1919

2020
4. Visit `http://localhost:1234` in a browser.
2121

22+
> 💡 Set the environment variable `ELM_DEBUG=1` before starting the dev server to enable Elm's time-travelling debugger.
23+
2224
## Dependencies
2325

2426
This depends on the [ui-core package](https://github.com/unisonweb/ui-core) via

webpack.dev.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const postcssPresetEnv = require("postcss-preset-env");
44
const FaviconsWebpackPlugin = require("favicons-webpack-plugin");
55

66
const API_URL = process.env.API_URL || "127.0.0.1:8080";
7+
const ELM_DEBUG = process.env.ELM_DEBUG || false;
78
const UI_CORE_SRC = "elm-stuff/gitdeps/github.com/unisonweb/ui-core/src";
89

910
module.exports = {
@@ -63,7 +64,7 @@ module.exports = {
6364
{
6465
loader: "elm-webpack-loader",
6566
options: {
66-
debug: false,
67+
debug: ELM_DEBUG,
6768
cwd: __dirname,
6869
},
6970
},

0 commit comments

Comments
 (0)