The easiest way to contribute to this project is to fork the repository on GitHub.
Then open it in Gitpod. The .gitpod.yml
file defines how the project is configured.
Alternatively, you can clone the repository locally, npm install
the dependencies and open it in your favorite editor.
The project basically consists of two main parts:
src/index.js
: the main libraryindex.html
: the main web page (uses static assets located inpublic/
)
The project is built using vite.
- Run
npm run dev
to start the development server http://localhost:3000 - Run
npm run build:docs
to bundle the documentation todocs/
- Run
npm run build:lib
to bundle the library todist/
The documentation is automatically built and deployed by .github/workflows/build-and-deploy.yml
on each push or pull request to main.
Perform checks:
# ensure to be on main branch
git checkout main
# ensure to have a clean state
git status
# check the release contents
npm pack
Create a release:
# increase version
npm version minor # or patch, major, etc.
# push version change
git push
# create a release tag, e.g. <version> = v1.2.3
git tag <version>
# push the release tag, e.g. <version> = v1.2.3
git push origin <version>
Publish to NPM:
# pack and upload the release bundle to NPM
npm publish