Opinionated TypeScript template for new packages.
- Source code
- npm package
- Licenses
- Package Phobia
- bundlejs
- npm trends
- Snyk Advisor
- Visualization of npm dependencies
- Go to or create the package folder.
- Get the template files:
npx degit github:joaopalmeiro/template-ts-package
or
npx degit github:joaopalmeiro/template-ts-package --force
- Search for
template-ts-package
and replace it with the package name. Ignore the template repository URL in the NOTES.md file. - Search for
Opinionated TypeScript template for new packages.
and replace it with the (short) package description. - Search for
João Palmeiro
and replace it with the author's name. - Search for
[email protected]
and replace it with the author's email address. - Change the
author.url
field in thepackage.json
file to the author's website/social media profile. - Install fnm (if necessary).
- Run the first two commands in the
Development
section to install Node.js and the development dependencies. - Open the NOTES.md file and install the package-specific dependencies according to the first command in the
Commands
section. - Update the
Source code
link at the top to the package repository link (if necessary). - Change
GitHub
in theDeployment
section toGitLab
orCodeberg
and update the link to the corresponding Tags page (if necessary). - Update the
homepage
,bugs.url
, andrepository.url
fields in thepackage.json
file with their respective repository-related links (if necessary). - Delete the TEMPLATE.md file.
- Delete the
Getting Started
section.
Install fnm (if necessary).
fnm install && fnm use && node --version && npm --version
npm install
npm run lint
npm run format
npm run build
npm pack --dry-run
npm version patch
npm version minor
npm version major
echo "v$(npm pkg get version | tr -d \")" | pbcopy
- Commit and push changes.
- Create a tag on GitHub Desktop.
- Check GitHub.
npm login
npm publish
- Check npm.