The solution itself is placed inside the solutions/clicks
folder.
index.js
is the entry point. The actual code is divided into modules, which are placed in the modules
folder together with tests.
data
folder contains the original array. dist
folder contains the resultset.json
and is being updated every time we run the solution.
This is a .git
repository with the commit history. I write commits using the Conventional Commits specification.
Required Node.js version: >= 14 (I use 18.14.0 LTS).
Inside the root folder:
npm install
Inside the root folder (Turborepo will be used) or inside the solutions/clicks
folder:
npm run solution
to run the solutionnpm run test
to run the testsnpm run lint
to run ESLintnpm run format
to run Prettier (works in the root folder only)
- Runs things really fast thanks to caching
- Enables sharing between apps
Thanks to Turborepo we are able to include several more apps, if such need arises, and share configs, packages, components/modules between all of them, if needed.
Vitest positions itself as modern Jest, having a lot of useful features included and setup by default. It works well, has great documentation and is a drop-in replacement for Jest.
Formatting tools, which help keep the code clean and consistent in its style.
A Git Hooks tool, which helps us run pre-commit scripts like lint
, format
and test
before commiting anything, thus improving code quality.
As far as I know this is the best Date
library: tiny, modular, simple, efficient.