A template for npm packages built in TypeScript
- Hit "Use This Template" to create the repository
- Enable Rolling Versions using My Rolling Versions Installation
- In Settings
- Disable "Wikis"
- Disable "Projects"
- Disable "Allow merge commits"
- Disable "Allow rebase merging"
- Enable "Always suggest updating pull request branches"
- Enable "Allow auto-merge"
- Enable "Automatically delete head branches"
- Create a new branch
- Commit initial code to the branch (be sure to replace all references to npm-package-template, and remove these instructions from the README)
- Push the new branch and create a PR
- In Settings -> Branch Protection, create a new rule
- Use "main" as the branch name pattern
- Enable "Require status checks to pass before merging"
- Select the unit tests and changelog as required
- Enable "Include administrators"
- Enable "Restrict who can push to matching branches"
- Merge the PR
yarn add @forbeslindesay/npm-package-template
import add from '@forbeslindesay/npm-package-template';
const result = add(2, 3);
// => 5