Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for sharing this project! I've had a lot of fun experimenting with various simulation options 😄
I wanted to run this locally so I made a quick update to modernize the project setup:
This replaces the previous setup with...
pnpm
for rapid and efficient package management.vite
as a dev server and bundler.vitest
to run existing tests with 100% passing tests.c8
to generate tests coverage reports.prettier
to keep the project consistently formatted. Thepnpm format
script will take care of everything. Also another tip is to enable the Prettier plugin for your editor to take care of formatting when saving, to be able to focus fully on the logic of the code rather than the style.This project is now also prepared for typescript conversion and made a quick attempt at that too, although it is not as straightforward with the
immutable
package. However, everything is prepared to start changing files into.ts
(maybe starting withsrc/index.ts
and changing the import inindex.html
to use./src/index.ts
instead of./src/index.js
).One final note is that this PR removes some of the old setup with Docker and Circle-CI. Could likely be added back easily if you want it in the future.
How to test locally:
Either...
Or do the following...
pnpm install
in the root of the projectpnpm dev
and see the running simulation athttp://127.0.0.1:5173
pnpm test
andpnpm test:coverage
(which will generate the coverage HTML report that can be viewed by runningpnpm dev
and going tohttp://127.0.0.1:5173/coverage/
(note the trailing slash here which is very important))