Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .cursor/environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"installCommand": "yarn install",
"updateCommand": "yarn install",
"node": {
"version": "18"
}
}
40 changes: 40 additions & 0 deletions .cursor/rules/amplitude-sdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Amplitude JavaScript SDK

This repository contains the JavaScript SDK for Amplitude Analytics.

## Project Overview

- **Language**: JavaScript (ES6+)
- **Build Tool**: Rollup
- **Test Framework**: Mocha + Karma
- **Package Manager**: Yarn
- **Main Entry Point**: `src/amplitude-client.js`

## Key Commands

- `yarn install` - Install dependencies
- `yarn build` - Build the SDK
- `yarn test` - Run tests
- `yarn lint` - Run linting
- `yarn fix` - Auto-fix linting issues

## Code Structure

- `src/` - Source code for the SDK
- `test/` - Test files
- `website/` - Documentation site (Docusaurus)
- `scripts/` - Build and utility scripts

## Important Notes

- This is a client-side analytics tracking library
- The main client is defined in `src/amplitude-client.js`
- Configuration options are in `src/options.js`
- The SDK supports both browser and Node.js environments

## Development Guidelines

- Follow existing code style (Prettier + ESLint configured)
- Write tests for new features
- Update documentation when adding public APIs
- Keep backwards compatibility in mind
Loading