lexigen

1.0.1 • Public • Published

Lexigen

Generate tracking code based on Mixpanel's lexicon definitions.

Usage

Prerequisites

  1. Generate a service account in Mixpanel with access to the desired mixpanel projects.
  2. Find the Mixpanel project from which you want to use the schema.

Minimum requirements

This package needs at least Node.js 16.

Using the generator

npx lexigen -u <service-account-username> -s <service-account-secret> -p <project-id> -t <target-language> > tracking.ts

The generated code is printed in stdout. You can simply redirect it to a file to save it.

Options

  -u, --username  Mixpanel service account username.         [string] [required]
  -s, --secret    Mixpanel service account secret/password.  [string] [required]
  -p, --project   Mixpanel project id to pull the schema definitions from.
                                                             [string] [required]
  -t, --target    A target API to generate.
                        [string] [choices: "typescript"] [default: "typescript"]
  -f, --filter    Filters the events by a specific tag.                 [string]

Language support

Currently supports the following generators:

  • Typescript.

The generator assumes that the mixpanel tracking package is already installed and setup. It only imports the package at the top of the generated file.

Readme

Keywords

none

Package Sidebar

Install

npm i lexigen

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

25.3 kB

Total Files

18

Last publish

Collaborators

  • khaledsakr