https://github.com/cameronhunter/typescript-project
A template repository for creating npm packages using TypeScript
https://github.com/cameronhunter/typescript-project
Last synced: about 1 month ago
JSON representation
A template repository for creating npm packages using TypeScript
- Host: GitHub
- URL: https://github.com/cameronhunter/typescript-project
- Owner: cameronhunter
- License: mit
- Created: 2023-11-20T01:38:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-19T18:46:21.000Z (over 2 years ago)
- Last Synced: 2025-02-24T13:32:03.000Z (over 1 year ago)
- Language: TypeScript
- Size: 194 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `@cameronhunter/typescript-project`
[](https://www.npmjs.com/package/@cameronhunter/typescript-project)
[](https://www.npmjs.com/package/@cameronhunter/typescript-project)
[](https://github.com/cameronhunter/typescript-project/actions/workflows/post-merge.yml)
> A template repository for creating npm packages using TypeScript
## Features
- [TypeScript](https://www.typescriptlang.org/) configured and ready (`pnpm run build`).
- [Vitest](https://vitest.dev/) configured and ready (`pnpm run test`).
- [Prettier](https://prettier.io/) configured and ready (`pnpm run format`).
- [Changesets](https://github.com/changesets/changesets) configured and ready (`pnpm changeset`) for versioning.
- `pre-merge` [action](https://docs.github.com/en/actions) which builds and tests the change. It will also auto-merge @dependabot changes.
- `post-merge` [action](https://docs.github.com/en/actions) which versions and publishes to both npm and Github packages along with generated changelogs.
- [Dependabot](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates) configured for automatic package updates. These will be auto-merged if they pass verification steps.
- Automatically add your Github username as the scope for unscoped npm packages.
## Setup
### Repository Settings
#### General Settings
- Turn off wikis and projects
- Turn off merge commits and rebase merging
- Set the default commit message for squash to be "pull request title and description".
- Turn on "Always suggest updating pull request branches"
- Turn on "Allow auto-merge"
- Turn on "Automatically delete head branches"
#### Branches
- Protect `main` branch
- Turn on "Require status checks to pass before merging"
- Turn on "Require branches to be up to date before merging"
#### Actions
- Set Workflow Permissions to "Read and write permissions"
- Turn on "Allow GitHub Actions to create and approve pull requests"
#### Secrets and variables
- Add an `NPM_TOKEN` repository secret: https://github.com/cameronhunter/typescript-project/settings/secrets/actions
### Files
- Replace `typescript-project` across the project.
- Remove `private: true` from `package.json`
- Add a `description` to `package.json`