This is the UI you see when you type ui into ucm.
🔔 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
ucmor if you built from source it can be downloaded with a script:./dev-ui-install.hsfrom theunisonrepository (Running Unison).
-
Start
ucm(the executable isunisoninstead ofucmif you built the unison repository from source) in headless mode:ucm headless, and copy the API URL (this URL is uniquely generated byucmat start-up) from theucmstart-up output (ucmalso outputs a UI URL, but this isn't used when developing for the UI/running the UI from this repository). -
Make sure the latest dependencies are installed with by running
npm installfollowed bynpm run ui-core-install. -
Start the dev server with:
API_URL="<API URL FROM UCM>" npm start -
Visit
http://localhost:1234in a browser.
💡 Set the environment variable
ELM_DEBUG=1before starting the dev server to enable Elm's time-travelling debugger.
This depends on the ui-core package via elm-git-install. That package includes both the Unison design system, and a core set of components for working with and rendering Unison definitions and namespaces.
Bumping ui-core package
The UI Core dependency can be updated to its latest version with this command:
npm run ui-core-updateTo install a specific sha:
npm run ui-core-install -- [SOME_UI_CORE_SHA]To install with a specific repo & sha (e.g. forked repo):
npm run ui-core-install -- [SOME_UI_CORE_SHA] [SOME_UI_CORE_URL]
# e.g. SOME_UI_CORE_URL=https://github.com/some-user/ui-core