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
- Review your code with CodeRabbit
- 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.jsonNatoBoram: 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.txtand 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.jsonandv.jsonthen delete those files- Adapt the rules to your needs. For example, you may want to disable CodeQL or the
fixworkflow.
- 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/CODEOWNERSto require code reviews from specific users or teams - Update
.github/FUNDING.yamlwith 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 .coderabbit.yaml .gemini .github/copilot-instructions.md .github/instructions .github/workflows/copilot-setup-steps.yaml .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# Run
pnpm pkg delete bin exports files main module scripts.build scripts.dev scripts.docker scripts.docker:build scripts.docker:kill scripts.docker:run scripts.docs scripts.start types
pnpm pkg set private=true
pnpm uninstall @typescript/native-preview typedoc
rm -rf .dockerignore .github/workflows/docker.yaml .github/workflows/github-pages.yaml Dockerfile src/index.ts src/main.ts typedoc.jsonThis 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 --tagsTo 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/newwith the nameNODE_AUTH_TOKEN