1.9 KiB
Contribution Guide
Setup Dev Environment
Utopia UI is just a React component library. To run it locally while making changes to it, you need to link it to a React app that uses its components. For this purpose, it is recommended to clone the utopia-map repository and link utopia-ui inside of it. This guide explains how to set everything up.
Setup utopia-ui
-
Clone the
utopia-uirepository:git clone https://github.com/utopia-os/utopia-ui.git cd utopia-ui -
Install dependencies:
npm install -
Build
utopia-ui: Run the build script to prepareutopia-uifor use:npm run build -
Link
utopia-uiglobally: This makes the local version ofutopia-uiavailable to be linked into other projects:npm link
2. Setup utopia-map and Link utopia-ui
-
Clone the
utopia-maprepository:git clone https://github.com/utopia-os/utopia-map.git cd utopia-map -
Install dependencies:
npm install -
Link
utopia-uiintoutopia-map: Usenpm linkto connect your localutopia-uiinstance toutopia-map:npm link utopia-ui -
Start the development environment: Run the local development environment for
utopia-mapto test changes inutopia-ui:npm run dev
3. Developing and Testing Changes
While working on utopia-ui, any changes you make need to be reflected in utopia-map. To ensure this utopia-ui has a watcher script, run it to
automatically rebuild when files change:
npm start
Layout System
- use heroicons or alternatively React Icons
- use Daisy UI with tailwindcss
- make use of the Daisy UI theme colors