TypeScript Snippets contains a collection of assorted TypeScript helper functions. I created this repository mostly as a way to tinker around with TypeScript outside of web projects, and to have a simple playground to experiment with various tools/configurations/best practices.
- GitHub Actions workflow to run unit tests upon pushing to the repo.
- Jest for unit testing.
- TypeDoc for generating documentation.
- Coveralls.io: A code coverage tracking tool that can integrate with GitHub Actions to add badges (like these) to your
README
. - Husky for linting commit messages.
- Commitlint: Checks that commit messages meet the conventional commit format (Husky works with Commitlint).
To build/run this project, you'll need to have nodejs and npm installed. Here are instructions for installing those dependencies.
To get this code, download/clone the repo and run npm install
in the project root directory to install dependencies.
To run unit tests for these snippets, run npm test
at the project root. Test results and a coverage summary will be output to the terminal, and a gitignored coverage/
directory will be created/updated at the root level of the project with a test coverage report.
You can read documentation (generated with TypeDoc) for this project here.
To re-generate the documentation, run npm run docs
in the project directory. The documentation will be located in the docs/
directory.