Skip to content

joaopalmeiro/template-ts-package

Repository files navigation

template-ts-package

Opinionated TypeScript template for new packages.

Getting Started

  1. Go to or create the package folder.
  2. Get the template files:
npx degit github:joaopalmeiro/template-ts-package

or

npx degit github:joaopalmeiro/template-ts-package --force
  1. Search for template-ts-package and replace it with the package name.
  2. Search for Opinionated TypeScript template for new packages. and replace it with the (short) package description.
  3. Search for João Palmeiro and replace it with the author's name.
  4. Search for joaopalmeiro@proton.me and replace it with the author's email address.
  5. Change the author.url field in the package.json file to the author's website/social media profile.
  6. Install fnm (if necessary).
  7. Run the first two commands in the Development section to install Node.js and the development dependencies.
  8. Open the NOTES.md file and install the package-specific dependencies according to the first command in the Commands section.
  9. Update the Source code link at the top to the package repository link (if necessary).
  10. Change GitHub in the Deployment section to GitLab or Codeberg and update the link to the corresponding Tags page (if necessary).
  11. Update the homepage, bugs.url, and repository.url fields in the package.json file with their respective repository-related links (if necessary).
  12. Delete the TEMPLATE.md file.
  13. Delete the Getting Started section.

Development

Install fnm (if necessary).

fnm install && fnm use && node --version && npm --version
npm install
npm run lint
npm run format
npm run build

Deployment

npm pack --dry-run
npm version patch
npm version minor
npm version major
  • Update the version in the API, Licenses, and Package Phobia links at the top.
echo "v$(npm pkg get version | tr -d \")" | pbcopy
npm login
npm publish

About

Opinionated TypeScript template for new packages.

Resources

License

Stars

Watchers

Forks