···11-# For most projects, this workflow file will not need changing; you simply need
22-# to commit it to your repository.
33-#
44-# You may wish to alter this file to override the set of languages analyzed,
55-# or to provide custom queries or build logic.
66-#
77-# ******** NOTE ********
88-# We have attempted to detect the languages in your repository. Please check
99-# the `language` matrix defined below to confirm you have the correct set of
1010-# supported CodeQL languages.
1111-#
121name: "CodeQL"
132143on:
154 schedule:
165 # Run once a week on Monday at 00:00 (12:00AM or Midnight, UTC)
1717- # See POSIX cron syntax visualized at https://crontab.guru/#0_0_*_*_1
1818- # GitHub Docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
1919- # Cron syntax reference: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07
66+ # - See visualization: https://crontab.guru/#0_0_*_*_1
77+ # - GitHub Docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
208 - cron: '0 0 * * 1'
2192210jobs:
+8-12
.github/workflows/docs.yml
···2233on:
44 push:
55- branches: [main]
55+ branches:
66+ - main
67 workflow_dispatch:
7888-# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
99-permissions:
1010- contents: read
1111- pages: write
1212- id-token: write
1313-1414-# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1515-# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
169concurrency:
1710 group: "pages"
1811 cancel-in-progress: false
19122013jobs:
2121- # Build job
2214 build:
1515+ permissions:
1616+ contents: read
2317 runs-on: ubuntu-latest
2418 steps:
2519 - uses: actions/checkout@v5
···2923 node-version: latest
3024 cache: 'npm'
3125 - name: Install dependencies
3232- run: npm ci
2626+ run: npm ci --verbose
3327 - name: Setup Pages
3428 id: pages
3529 uses: actions/configure-pages@v5
···4034 with:
4135 path: ./docs/typedoc
42364343- # Deployment job
4437 deploy:
3838+ permissions:
3939+ pages: write
4040+ id-token: write
4541 environment:
4642 name: github-pages
4743 url: ${{ steps.deployment.outputs.page_url }}
···11MIT License
2233-Copyright (c) 2023 {{author}}
33+Copyright (c) 2025 {{author}}
4455Permission is hereby granted, free of charge, to any person obtaining a copy
66of this software and associated documentation files (the "Software"), to deal
+12-24
README.md
···11-# TypeScript Template
11+# Node.js & TypeScript template
2233-This repository template makes it easier to create a new NPM library, package or application using Node.js and TypeScript. It comes with several developer tools pre-configured and ready to use, so it's easier to get started.
33+This template provides a semi-minimal monorepo setup for Node.js + TypeScript projects.
4455## Features
66-77-- [x] [Node.js](https://nodejs.org/) and latest [TypeScript](https://www.typescriptlang.org/) support
88-- [x] Monorepo support with [NPM workspaces](https://docs.npmjs.com/cli/v10/using-npm/workspaces)
99-- [x] JS module resolution with [ES Modules](https://nodejs.org/api/esm.html), the official ECMAScript standard
1010-- [x] Generated API documentation with [TypeDoc](https://typedoc.org/)
1111-- [x] Continuous integration with [GitHub Actions](https://github.com/features/actions)
1212-- [x] Dependency updates with [Dependabot](https://github.com/dependabot)
1313-- [x] Uses the JavaScript toolchain created by [VoidZero](https://voidzero.dev)
1414- - [x] Bundled, minified source code with [Vite](https://vitejs.dev/)
1515- - [x] Unit testing and code coverage with [Vitest](https://vitest.dev/)
1616- - [x] Linted code with [Oxlint](https://oxc.rs/docs/guide/usage/linter.html)
66+- [x] ESM support (ECMAScript modules)
77+- [x] [TypeDoc](https://typedoc.org/) for generating API documentation
88+- [x] [GitHub Actions](https://github.com/features/actions) for continuous integration
99+- [x] [Dependabot](https://github.com/dependabot) for updating dependencies
1010+- [x] Uses the [VoidZero](https://voidzero.dev)-based JS toolchain
1111+ - [x] [Vite](https://vitejs.dev/) & [tsdown](https://tsdown.dev) for bundling & minifying source code
1212+ - [x] [Vitest](https://vitest.dev/) for unit testing & code coverage
1313+ - [x] [Oxlint](https://oxc.rs/docs/guide/usage/linter.html) for linting code
17141815## Getting started
19162017### Create a new repository
2121-2218Choose a method:
2319- **GitHub UI**: Press the "Use this template" button in the top-right corner of this page.
2420- **GitHub CLI**: Install [GitHub CLI](https://cli.github.com). Then run one of the following:
···2824 ```
29253026### Replace placeholders
3131-3227Using your text editor or IDE, find-and-replace the following placeholders:
33283429- `@author/package`: Replace this with the author's name (e.g a user or organization) and package's name.
···5348## Configure
54495550### NPM scripts
5656-5751| Command | Description |
5852| ------- | ----------- |
5953| `npm run build` | Build all packages |
···6357| `npm run test` | Run unit tests |
6458| `npm run test-ci` | Run unit tests in CI mode |
6559| `npm run test-ui` | Run unit tests in UI/browser mode |
6666-| `npm run test-watch` | Run unit tests in watch mode |
6767-| `npm run lint` | Check for Oxlint/publint errors |
6868-| `npm run fix` | Fix Oxlint errors (publint errors must be fixed manually) |
6969-| `npm run oxlint` | Check for Oxlint errors |
7070-| `npm run publint` | Check for NPM packaging errors |
6060+| `npm run lint` | Check for Oxlint errors |
6161+| `npm run fix` | Fix Oxlint errors |
71627263### Developer tools
7373-7464| Tool | File | Documentation |
7565| ------------------ | ---- | ------------- |
7666| NPM | [`package.json`](package.json), [`packages/*/package.json`](./packages/pkg1/package.json) | [docs](https://docs.npmjs.com/cli/v10/configuring-npm/package-json), [website](https://docs.npmjs.com/) |
···8272| Dependabot | [`.github/dependabot.yml`](./.github/dependabot.yml) | [docs](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file), [website](https://github.com/dependabot) |
83738474## License
8585-8675This software is licensed under the MIT license ([`LICENSE-MIT`](./LICENSE) or <https://opensource.org/license/mit/>).
87768877### Contribution
8989-9078Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.
···11# @author/package
22-32[](https://opensource.org/licenses/MIT)
43[](https://github.com/{{username}}/{{repository}}/deployments/activity_log?environment=github-pages)
54[](https://github.com/{{username}}/{{repository}}/actions/workflows/main.yml)
···76{{desc}}
8798## Install
1010-119```shell
1210npm install @author/package
1311```
14121513## License
1616-1714This library is licensed under the MIT license ([`LICENSE-MIT`](../../LICENSE) or http://opensource.org/licenses/MIT).
18151916### Contribution
2020-2117Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.