Node Lib Template
September 9, 2022 · View on GitHub
node library project template
Features
CI Automation
Using GitHub Actions
- release with conventional-commits & semantic-release
- publish to both npm Public Registry & GitHub Package Manager
- full history changelog in GitHub Releases
- automatic pull-requests for dependency updates using dependabot
- automatic merging of "patch" updates to dependencies using dependabot-auto-merge
- lint everything with mega-linter
- lint commit message format against Conventional Commits
- test on all LTS versions of Node.js
- run
npm auditbefore releasing / testing to keep a higher security standard - repositories are kept up to date using
@ahmadnassri/action-template-repository-sync
Local Automation
Using Docker Compose
- lint everything with mega-linter
- test on all LTS versions of Node.js
- generate README using pandoc with a template
Usage
GitHub Templates
Automated through
@ahmadnassri/action-template-repository-sync
- create a repository from the template
- clone locally
- add secrets in GitHub Actions for
NPM_TOKEN&GH_TOKEN - update
colophon.yml,docs/README.mdwith info about the project
Note:
GH_TOKENis required for actionauto-merge,readme,releaseworkflows
Local Automation
use Docker Compose to run tasks locally:
docker compose run readmeto regenerateREADME.mddocker compose run testto run tests across all LTS versions of Node.jsdocker compose run lintto execute mega-linter locally
Note:
Your mainREADME.mdfile is indocs/README.md, the file at root is generated using pandoc using the provided template.You should run
docker compose run readmeafter any change todocs/README.mdand before commit / push
Author: Ahmad Nassri • Twitter: @AhmadNassri