Skip to content

NatoBoram/gigachad.ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@natoboram/gigachad.ts

Node.js CI Docker CI CodeQL Coverage GitHub Pages Dependabot Updates

The most gigachad project setup for TypeScript.

Usage

Once you've forked this template, here's a few first steps to get you started:

  1. Do a global search & replace for the following strings, in order:
    • @natoboram/gigachad.ts: This will become your package name
    • NatoBoram/gigachad.ts: This makes links to your repository
    • Nato Boram: Your author name for package.json
    • NatoBoram: Your GitHub username
    • gigachad.ts: The name of your new repository
    • gigachad: The name of the command-line interface exposed by this package
  2. Choose an open source license
  3. In your repository's /settings/rules, import the rulesets main.json and v.json then delete those files
    • Adapt the rules to your needs. For example, you may want to disable CodeQL or the fix workflow.
  4. Remove the placeholder release in CHANGELOG.md
  5. Update .github/CODEOWNERS to require code reviews from specific users or teams
  6. Update .github/FUNDING.yaml with your own sponsorship links
  7. In CODE_OF_CONDUCT.md, update the contact link in the "Enforcement" section
  8. Remove the parts you don't need with the help of the commands below

Remove what you don't need

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

Publishing

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.

  1. Sign in to https://www.npmjs.com
  2. Access Tokens / Generate New Token / Classic Token / Automation / Generate Token
  3. Copy that token and save it in your project's secrets at /settings/secrets/actions/new with the name NODE_AUTH_TOKEN