Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

🟦 The base for any good TypeScript package

License

Notifications You must be signed in to change notification settings

PostHog/template-typescript

Repository files navigation

PostHog Template for the Next TypeScript Package

npm package License: MIT

Hey there! Starting a new JS/TS package?

Whether it's a library, a plugin, an integration, a CLI, or anything else in the world:

  • Write it in TypeScript for best reliability and development experience.
  • Use the battle-tested Yarn for dependency management.
  • Test quickly and easily with Jest (plus ts-jest for TypeScript support).
  • Adhere to PostHog Style™️ by formatting code with Prettier and ensuring best practices with ESLint – or actually, don't do it: let pre-commit hooks handle this for you.
  • Have GitHub Actions run all of the above when working on pull requests. Plus have them take care of publishing releases on npm and GitHub whenever the version is incremented.

Start out using this template and hit the ground quickly with all of the above from the get-go.

Get on with it

  1. Update fields name, description, keywords, respository, bugs and homepage in package.json.
  2. Make sure that you have Yarn installed and run yarn to install dependencies.
    Note: file yarn.lock will be created. Commit this.
  3. Write your package, starting with src/index.ts!

When publishing on GitHub, add an automation-type npm access token as GitHub secret NPM_TOKEN in order for auto-release to work.

Now, erase the notes above and fill this README with something actually relevant! Don't forget to update the npm badge too.

Questions?

We're here to help you with anything PostHog!

About

🟦 The base for any good TypeScript package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published