Setup a CoSpace
to link multiple (mono)repos together!
-
Install Node.js (Version 18.x)
- You can download Node.js from the official Node.js website.
-
Visual Studio Code
- Open Visual Studio Code.
File
->Open Workspace From File
- Select
reporting
workspace file in the root folder.
-
Clone the
viewer-components-react
repository into therepos
folder.- Navigate to the
repos
directory:cd ./repos/
- Clone the repository:
git clone https://github.com/iTwin/viewer-components-react.git
- Upon completion, you should find a new
viewer-components-react
directory inside therepos
folder. For instance:./repos/viewer-components-react
- Navigate to the
-
Install
pnpm
and the necessary packages.- Install
pnpm
globally:npm install -g pnpm
- Navigate back to the root directory if not already present:
cd ..
- Install the packages:
pnpm i
- Install
-
Build the
grouping-mapping-widget
package.- From anywhere within the root directory, build the package:
pnpm build
- From anywhere within the root directory, build the package:
-
Update the environment variables in the
viewer
application.- Open the
.env
file inrepos/viewer/
. - Update any necessary or missing variables.
- Open the
-
Start the
viewer
application.- Navigate to the viewer directory:
cd ./repos/viewer
- Start the application:
npm start
- Navigate to the viewer directory:
-
Development Flow:
- Make desired changes to the widget.
- Execute
pnpm run build
from any location ornpm run build
from within the widget root directory. - While the
viewer
application is running, you should be able to observe the changes.