Universal JavaScript library project template
Using GitHub Actions
- automatic releases 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 super-linter
- lint commit message format against Conventional Commits
- test on all LTS versions of Node.js + Headless browsers (Chromium, Safari, Firefox)
- run
npm audit
before releasing / testing to keep a higher security standard - generate universal JavaScript outputs using Microbundle
- unit testing & code coverage with Tap
- browser testing with Playwright
Using Docker Compose
- lint everything with super-linter
- test on all LTS versions of Node.js
- generate README using pandoc with a template
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.md
with info about the project
Note:
GH_TOKEN
is required for actionauto-merge
,readme
,release
workflows
use Docker Compose to run tasks locally:
docker-compose run readme
to regenerateREADME.md
docker-compose run test
to run tests across all LTS versions of Node.jsdocker-compose run lint
to execute super-linter locally
Note:
Your mainREADME.md
file is indocs/README.md
, the file at root is generated using pandoc using the provided template.You should run
docker-compose run readme
after any change todocs/README.md
and before commit / push
npm install template-js-lib
import * as Lib from '@ahmadnassri/template-js-lib'
Lib() // returns "hello world"
const Lib = require('@ahmadnassri/template-js-lib')
Lib() // returns "hello world"
<script src="https://unpkg.com/@ahmadnassri/template-js-lib@latest/dist/index.umd.js">// UMD bundle</script>
<script type="module" src="https://unpkg.com/@ahmadnassri/template-js-lib@latest/dist/index.module.mjs">// ESM bundle</script>
<script type="module" src="https://unpkg.com/@ahmadnassri/template-js-lib@latest/dist/index.modern.mjs">// ESM for modern browsers</script>
Author: Ahmad Nassri • Twitter: @AhmadNassri