* Add support for the Jekyll sample filter See https://jekyllrb.com/docs/liquid/filters I am sorting the array randomly and then picking the first N items or all items if there is no sample limit. * Add tests for `push` I thought `push` was broken because it doesn't work on the Playground but that's not the case. Here are the tests to prove it. Taken from the `concat` tests. * Remove the sample experiment This got in from another branch lol. * Recommend the build:dist command over the whole build This one works for me locally whereas build:docs is reporting some issues. * Return the full `build` command and explain how to use `commitlint` to workshop the message I am working on a PR to make `build` run on macOS because it is a part of the pre-commit hook anyway so all contributors should make it work for them. I have also shown how to check your messages against `commitlint` from the CLI because it is faster than using the VS Code GUI.
1.2 KiB
Contributing
- Build everything and run tests to learn how to do both:
npm run buildnpm run test
Tests won't at first unless you've done a build at least once. Subsequent changes to tests do not need re-builds but changes to the code and then tests need a build to pick up the new code by the tests.
- Make your changes and add a test for them
- Build after you've made your changes
- Run tests as per the above to validate your changes
- Create a pull request
-
Ensure the build runs because the Husky pre-commit hook checks it
npm run checkchecks runs the build, tests, lint and perf testscommitlintchecks the commit message format
If there is a problem you will see it in the pre-commit hook output. In VS Code, this output will be shown in a new file in a new tab if the pre-commit hook fails. If you want to check the commit message without using the VS Code Source Control UI, you can run
echo "feat: my commit message" > npx commitlintdirectly. -
git switch -c your_branch_name(do this in your fork not the main repo) -
git add . -
git commit -m "feat: Adding my change" -
git push -
Go to GitHub and find your fork, open a PR against the upstream from it