New Project, Monday

    @posthog/plugin-scaffold
    TypeScript icon, indicating that this package has built-in type declarations

    1.4.2 • Public • Published

    PostHog Plugin Scaffold

    npm package MIT License

    This project contains shared typescript types that PostHog plugin authors can use.

    # if using yarn
    yarn add --dev @posthog/plugin-scaffold
    
    # if using npm
    npm install --save-dev @posthog/plugin-scaffold

    Then in your plugins:

    import { PluginEvent, PluginInput, PluginMeta } from "@posthog/plugin-scaffold";
    
    export function processEvent(event: PluginEvent, meta: PluginMeta<PluginInput>) {
        if (event.properties) {
            event.properties['hello'] = 'world'
        }
        return event
    }

    Releasing a new version

    It's magic! Just bump up version in package.json on the main branch and the new version will be published automatically, on GitHub and on npm. Courtesy of GitHub Actions.

    Questions?

    Join our Slack community.

    Keywords

    none

    Install

    npm i @posthog/plugin-scaffold

    DownloadsWeekly Downloads

    3,513

    Version

    1.4.2

    License

    MIT

    Unpacked Size

    28.3 kB

    Total Files

    16

    Last publish

    Collaborators

    • xavier-posthog
    • ben-posthog
    • alexkim205
    • twixes
    • fuziontech
    • mariusandra
    • yakkomajuri
    • macobo
    • timgl