Before you can build the UV, we assume the following list of software is already installed in your system
- Git
- Node 14.18.1 or higher
- Npm 8.1.1 or higher
In order to contribute to the UV, you must have a github account so you can push code and create a new Pull Request (PR).
Once you are all setup, following the Github's guide of how to fork a repository: https://guides.github.com/activities/forking/
-
Clone the
universalviewer
repository:git clone https://github.com/UniversalViewer/universalviewer.git
-
On the command line, go in to the
universalviewer
folder
cd universalviewer
-
Run
npm install
To build the debug version of the viewer, just run (on the command line, in the universalviewer
folder):
npm start
This will compile the project using webpack and serve the examples on localhost:8080
To build the distribution version of the UV, just run (on the command line, in the universalviewer
folder):
npm run build
UV source code lives inside the /src/
folder.
Here is a diagram showing the overall architecture of the project.
Before commiting your changes make sure tests are passing:
npm test
Note: the development server must be running (
npm start
)
Tests are written using Jest
# Create a git branch
git checkout -b my-improvement
# Add changes
git add .
# Create commit
git commit -m "fix(component): message"
git commit -m "Release v1.2.3"
git tag v1.2.3
git push origin main v1.2.3
Create a PR: https://guides.github.com/activities/forking/