Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/modernize project #20

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Greenheart
Copy link

@Greenheart Greenheart commented Dec 8, 2022

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. The pnpm formatscript 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.
  • Also updated the README with new instructions.

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 with src/index.ts and changing the import in index.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...

  1. Follow the updated setup instructions in README.md:

Or do the following...

  1. Install https://pnpm.io and run pnpm install in the root of the project
  2. Run pnpm dev and see the running simulation at http://127.0.0.1:5173
  3. Run the tests with pnpm test and pnpm test:coverage (which will generate the coverage HTML report that can be viewed by running pnpm dev and going to http://127.0.0.1:5173/coverage/ (note the trailing slash here which is very important))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant