The most gigachad project setup for TypeScript.
- Containerize with Docker
- Deliver continuously with GitHub Workflows
- Document with TypeDoc
- Execute workflows locally with
act
- Format on save in VSCode
- Format with Prettier
- Interact with GitHub using
gh
- Keep a changelog with the Keep a Changelog format
- Lint code with ESLint
- Lint markdown with markdownlint
- Manage packages with pnpm
- Pledge your respect with the Contributor Covenant
- Run with Node.js
- Secure your code with CodeQL
- Test units and calculate coverage with Vitest
- Update dependencies with Dependabot
Once you've forked this template, here's a few first steps to get you started:
- Do a global search & replace for the following strings, in order:
@natoboram/gigachad.ts
: This will become your package nameNatoBoram/gigachad.ts
: This makes links to your repositoryNato Boram
: Your author name forpackage.json
NatoBoram
: Your GitHub usernamegigachad.ts
: The name of your new repositorygigachad
: The name of the command-line interface exposed by this package
- Choose an open source license
- Delete the existing one in
LICENSE.txt
and place your own - Find your license in the SPDX License List and put it in
package.json
- Delete the existing one in
- In your repository's
/settings/rules
, import the rulesetsmain.json
andv.json
then delete those files- Adapt the rules to your needs. For example, you may want to disable CodeQL or the
fix
workflow.
- Adapt the rules to your needs. For example, you may want to disable CodeQL or the
- Remove the placeholder release in
CHANGELOG.md
- Update
.github/CODEOWNERS
to require code reviews from specific users or teams - Update
.github/FUNDING.yaml
with your own sponsorship links - In
CODE_OF_CONDUCT.md
, update the contact link in the "Enforcement" section - Remove the parts you don't need with the help of the commands below
Here's a few useful commands to delete what you don't need.
# AI
rm -rf .gemini .github/copilot-instructions.md .github/instructions .vscode/mcp.json
# Command-line interface
pnpm pkg delete bin scripts.docker scripts.docker:build scripts.docker:kill scripts.docker:run scripts.start
rm -f .dockerignore .github/workflows/docker.yaml Dockerfile src/main.ts
# Docker
pnpm pkg delete scripts.docker scripts.docker:build scripts.docker:kill scripts.docker:run
rm -f .dockerignore .github/workflows/docker.yaml Dockerfile
# Documentation
pnpm pkg delete scripts.docs
pnpm uninstall typedoc
rm -f .github/workflows/github-pages.yaml typedoc.json
# Funding
pnpm pkg delete funding
rm -f .github/FUNDING.yaml
# Library
rm -f .github/workflows/github-pages.yaml typedoc.json src/index.ts
pnpm uninstall typedoc
pnpm pkg delete exports main module scripts.docs types
# Rulesets
rm -rf .github/rulesets
This template offers a GitHub Workflow to help you automatically publish a version to both the NPM public registry, the GitHub Package Registry and in GitHub Releases on the push of a tag.
Start by updating your version number:
git checkout main
git pull --autostash --prune --rebase
VERSION=$(pnpm version patch --no-git-tag-version)
git checkout -b "release/$VERSION"
git commit --all --message "🔖 $VERSION"
git push --set-upstream origin "release/$VERSION"
gh pr create --assignee @me --base main --draft --fill-verbose --head "release/$VERSION" --title "🔖 $VERSION"
Once your CI passes, merge the pull request, wait for the CI to pass again then push a new tag:
git checkout main
git pull --autostash --prune --rebase
git tag "$VERSION" --annotate --message "🔖 $VERSION" --sign
git push --tags
To publish on NPM, you'll need to provide your NPM token.
- Sign in to https://www.npmjs.com
- Access Tokens / Generate New Token / Classic Token / Automation / Generate Token
- Copy that token and save it in your project's secrets at
/settings/secrets/actions/new
with the nameNODE_AUTH_TOKEN