From d00f6bad71eee67b1665d7151463a380521d9324 Mon Sep 17 00:00:00 2001 From: Andinet Enquobahrie Date: Mon, 18 Aug 2025 15:23:22 -0400 Subject: [PATCH 1/2] docs: update CONTRIBUTING.md with prerequisites and dependencies table --- CONTRIBUTING.md | 105 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 85 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 888e5bba4..f780d1160 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,46 +1,109 @@ # Development -Below lists a few commands for building and running a local copy of VolView. +## Prerequisites -To prepare your environment after cloning the repo, run: +Before you begin, make sure your environment matches the following versions: + +- **Node.js**: >= 18.20.0 (20.x LTS recommended) +- **npm**: >= 9.x (npm 10+ works with Node 20) + +Check your versions: +```bash +node --version +npm --version ``` + +> **Tip:** Use `nvm` or `volta` to manage and switch Node.js versions. + +For reproducible installs, use: + +```bash +npm ci +``` + +If you encounter errors about `package-lock.json` schema, regenerate it: + +```bash +rm package-lock.json npm install ``` -## Compiles and hot-reloads for development +--- + +## Dependencies + +The project relies on the following key libraries and tools (from `package.json`): + +| Package | Version | +|------------------------|-------------| +| Vite | ^4.5.2 | +| Vue | ^3.5.13 | +| TypeScript | ~5.1.3 | +| Vitest | ^0.32.1 | +| Vuetify | 3.7.0 | +| Pinia | ^2.0.34 | +| @kitware/vtk.js | ^32.12.1 | +| itk-wasm | 1.0.0-b.188 | +| @itk-wasm/dicom | 7.6.0 | +| @sentry/vue | ^7.54.0 | +| @vueuse/core | ^13.0.0 | + +Refer to `package.json` for the full list of dependencies and devDependencies. + +--- + +## Setup + +To prepare your environment after cloning the repo, run: +```bash +npm install ``` + +--- + +## Compiles and hot-reloads for development + +```bash npm run dev ``` +--- + ## Compiles and minifies for production -``` +```bash npm run build ``` +--- + ## Analyzing the production bundle -You can generate a production bundle and produce a bundle size breakdown report: +Generate a production bundle and produce a bundle size breakdown report: -``` +```bash npm run build:analyze ``` +--- + ## Lints and fixes files -``` +```bash npm run lint ``` +--- + ## Testing -``` +```bash # unit tests -npm run test:unit +npm run test -# e2e tests +# e2e tests (Chrome) npm run test:e2e:chrome ``` @@ -50,36 +113,38 @@ When adding a new baseline image and test, the image should be pulled from GitHu #### Run one e2e spec file -``` +```bash npm run test:e2e:dev -- -- --spec ./tests/specs/remote-manifest.e2e.ts ``` +--- + ## Developing with VTK.js Follow these steps to develop against a custom development branch of VTK.js: 1. Build and package VTK.js: -```sh +```bash path/to/vtk-js > npm run build:esm ``` 2. Create a symbolic link to the VTK.js distribution folder on your local system: -```sh -> cd path/to/vtk-js/dist/esm -path/to/vtk-js/dist/esm > npm link +```bash +cd path/to/vtk-js/dist/esm +npm link ``` 3. Reference the symbolic link in your local VolView build: -```sh -> cd path/to/VolView -path/to/VolView > npm link --no-save @kitware/vtk.js +```bash +cd path/to/VolView +npm link --no-save @kitware/vtk.js ``` 4. Build and run VolView: -```sh -path/to/VolView > npm run dev +```bash +npm run dev ``` From 1cc9236111f9e47563b2c0fa13fd45d75e8b2af3 Mon Sep 17 00:00:00 2001 From: Andinet Enquobahrie Date: Wed, 20 Aug 2025 08:46:46 -0400 Subject: [PATCH 2/2] docs: remove redundant dependency details and extra tips --- CONTRIBUTING.md | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f780d1160..f8f37f59f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,33 +22,11 @@ For reproducible installs, use: npm ci ``` -If you encounter errors about `package-lock.json` schema, regenerate it: - -```bash -rm package-lock.json -npm install -``` --- ## Dependencies -The project relies on the following key libraries and tools (from `package.json`): - -| Package | Version | -|------------------------|-------------| -| Vite | ^4.5.2 | -| Vue | ^3.5.13 | -| TypeScript | ~5.1.3 | -| Vitest | ^0.32.1 | -| Vuetify | 3.7.0 | -| Pinia | ^2.0.34 | -| @kitware/vtk.js | ^32.12.1 | -| itk-wasm | 1.0.0-b.188 | -| @itk-wasm/dicom | 7.6.0 | -| @sentry/vue | ^7.54.0 | -| @vueuse/core | ^13.0.0 | - Refer to `package.json` for the full list of dependencies and devDependencies. ---