@natoboram/gigachad.tsThe most gigachad project setup for TypeScript.
actghOnce you've forked this template, here's a few first steps to get you started:
@natoboram/gigachad.ts: This will become your package nameNatoBoram/gigachad.ts: This makes links to your repositoryNato Boram: Your author name for package.jsonNatoBoram: Your GitHub usernamegigachad.ts: The name of your new repositorygigachad-ts: The name of your package on JSRgigachad: The name of the command-line interface exposed by this packageLICENSE.txt and place your ownpackage.json and jsr.json/settings/rules, import the rulesets main.json and v.json then delete those files
fix workflow.CHANGELOG.md.github/CODEOWNERS to require code reviews from specific users or teams.github/FUNDING.yaml with your own sponsorship linksCODE_OF_CONDUCT.md, update the contact link in the "Enforcement" sectionHere'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 GEMINI.md
# 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
# IPFS
rm -rf .github/workflows/ipfs.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.json
This template offers a GitHub Workflow to help you automatically publish a version to NPM, to GitHub Packages, to GitHub Releases and to JSR 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)
echo $(jq --arg v "${VERSION#v}" '.version = $v' jsr.json) > jsr.json
pnpm run format
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.
/settings/environments with the name npm-public-registrynpm-public-registry environment in a new secret called NODE_AUTH_TOKENTo publish on JSR, you'll need to create a scope and register your package first.
/settings/environments with the name javascript-registryYou can also create the environments github-packages-registry and github-releases for the publishing workflow to use automatically.
You can import some relevant labels from Dependabot with these commands:
gh label create dependencies --color '#0366d6' --description 'Pull requests that update a dependency file' --force
gh label create docker --color '#21ceff' --description 'Pull requests that update Docker code' --force
gh label create docker_compose --color '#e5f2fc' --description 'Pull requests that update Docker Compose code' --force
gh label create github_actions --color '#000000' --description 'Pull requests that update GitHub Actions code' --force
gh label create javascript --color '#168700' --description 'Pull requests that update JavaScript code' --force