sholloway / cells

A Javascript module for simulating Conway's Game of Life in a browser."
https://samuelholloway.com/cells
MIT License
1 stars 0 forks source link
cellular-automata web-workers

Conway's Game

MIT Licence Open Source Love


Introduction

This project is a web application that enables running various cellular automata in an HTML Canvas. It uses Webpack for bundling and LitElement for the the user interface.

Getting Started

  1. Install dependencies.
npm install
  1. Run the unit tests.
npm test
  1. Run the app locally.
npm run start:dev

Doing Development

Calculating test coverage.

npm run coverage

Generating code documentation.

npm run docs

Updating Dependencies

  1. Detect updates via npm outdated
  2. Change the dependencies version number to the desired version.
  3. npm update --save
  4. npm update --dev
  5. Run the tests.

Creating a Release

The site is hosted on GitHub pages. It sources the pages from the docs directory. To update the site we simple do a Webpack production build and copy the contents of the dist directory to the docs directory.

  1. Create a release branch.
git checkout -b release/MyRelease
  1. Build the app.
npm run build
  1. Remove the old app and copy in the new.
rm -r ./docs/*
cp -R ./dist/* docs
  1. Verify the production app works without Webpack. I use the Python HTTP server for this, but there are many ways to do this.
cd docs
python3 -m http.server 8000
  1. Check in the changes, push to origin and submit a pull request. Merging the pull request into Master will deploy the site.

Related Resources

Testing

JSDoc