Skip to content

Commit 3c8a8a2

Browse files
committed
Update README.md
1 parent 2d5327c commit 3c8a8a2

File tree

1 file changed

+8
-24
lines changed

1 file changed

+8
-24
lines changed

README.md

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,15 @@
1-
# PostHog Template for the Next TypeScript Package
1+
# Hello World – a PostHog Plugin
22

3-
[![npm package](https://img.shields.io/npm/v/♦️♦️♦️SET-YOUR-OWN-PACKAGE-NAME-HERE♦️♦️♦️?style=flat-square)](https://www.npmjs.com/package/♦️♦️♦️SET-YOUR-OWN-PACKAGE-NAME-HERE♦️♦️♦️)
3+
[![npm package](https://img.shields.io/npm/v/posthog-plugin-hello-world?style=flat-square)](https://www.npmjs.com/package/posthog-plugin-hello-world)
44
[![License: MIT](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](https://opensource.org/licenses/MIT)
55

6-
> Hey there! Starting a new JS/TS package?
7-
>
8-
> Whether it's a library, a plugin, an integration, a CLI, or anything else in the world:
9-
>
10-
> - Write it in TypeScript for best reliability and development experience.
11-
> - Use the battle-tested Yarn for dependency management.
12-
> - Test quickly and easily with Jest (plus `ts-jest` for TypeScript support).
13-
> - Adhere to PostHog Style™️ by formatting code with Prettier and ensuring best practices with ESLint
14-
> – or actually, don't do it: let pre-commit hooks handle this for you.
15-
> - 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.
16-
>
17-
> Start out using this template and hit the ground quickly with all of the above from the get-go.
18-
>
19-
> ## Get on with it
20-
>
21-
> 1. Update fields `name`, `description`, `keywords`, `respository`, `bugs` and `homepage` in `package.json`.
22-
> 2. Make sure that you have Yarn installed and run `yarn` to install dependencies.
23-
> Note: file `yarn.lock` will be created. Commit this.
24-
> 3. Write your package, starting with `src/index.ts`!
25-
>
26-
> _When publishing on GitHub, add an automation-type npm access token as GitHub secret `NPM_TOKEN` in order for auto-release to work._
6+
This is an exemplary PostHog plugin. It adds property `"greeting"` to every event with a configurable value – `"Hello world!"` by default.
277

28-
_Now, erase the notes above and fill this README with something actually relevant! Don't forget to update the npm badge too._
8+
A few goodies included with this plugin:
9+
- TypeScript for best reliability and development experience,
10+
- Jest for convenient testing,
11+
- Prettier and ESLint for code style and best practices – both handled by pre-commit hooks,
12+
- GitHub Actions set up to run code quality and functionality tests in pull requests, and also to publish a new npm release when the package version is incremented in `main` (the latter requires an automation type npm access token to be set with a repo secret `NPM_TOKEN`).
2913

3014
## Questions?
3115

0 commit comments

Comments
 (0)