Below lists a few commands for building and running a local copy of VolView.
To prepare your environment after cloning the repo, run:
npm install
npm run dev
npm run build
You can generate a production bundle and produce a bundle size breakdown report:
npm run build:analyze
npm run lint
# unit tests
npm run test:unit
# e2e tests
npm run test:e2e:chrome
When running end-to-end tests, baseline images are saved to tests/baseline
. Baseline diffs and actual snapshots are saved to .tmp
.
When adding a new baseline image and test, the image should be pulled from GitHub Actions. Every test run will upload artifacts containing the snapshots taken, and those should be used when verifying and committing the baseline images.
npm run test:e2e:dev -- -- --spec ./tests/specs/remote-manifest.e2e.ts
Follow these steps to develop against a custom development branch of VTK.js:
- Build and package VTK.js:
path/to/vtk-js > npm run build:esm
- Create a symbolic link to the VTK.js distribution folder on your local system:
> cd path/to/vtk-js/dist/esm
path/to/vtk-js/dist/esm > npm link
- Reference the symbolic link in your local VolView build:
> cd path/to/VolView
path/to/VolView > npm link --no-save @kitware/vtk.js
- Build and run VolView:
path/to/VolView > npm run dev