Official JavaScript/TypeScript SDKs for the Nevent platform.
| Package | Version | Description | Size |
|---|---|---|---|
| @nevent/core | 0.1.0 | Core utilities and types | ~5KB |
| @nevent/subscriptions | 2.0.0 | Newsletter widget | ~15KB |
The fastest way to get started is to load the SDK directly from our CDN:
<!-- Production (always pin to specific version) -->
<script src="https://neventapps.com/subs/v2.0.0/nevent-subscriptions.umd.cjs"></script>
<script>
const widget = new NeventSubscriptions.NewsletterWidget({
newsletterId: 'your-newsletter-id',
tenantId: 'your-tenant-id',
containerId: 'newsletter-container',
});
widget.init();
</script>
<!-- Development (latest version, updates automatically) -->
<script src="https://dev.neventapps.com/subs/latest/nevent-subscriptions.umd.cjs"></script>Important: Always use versioned URLs in production (e.g., /v2.0.0/) to prevent breaking changes. The /latest/ alias auto-updates and should only be used for development/testing.
Available formats:
- UMD (Browser):
nevent-subscriptions.umd.cjs- GlobalNeventSubscriptionsobject - ES Module:
nevent-subscriptions.js- For modern bundlers
See examples/basic-integration.html for a complete working example.
# Install packages
npm install @nevent/subscriptions
# or
pnpm add @nevent/subscriptionsimport { NewsletterWidget } from '@nevent/subscriptions';
const widget = new NewsletterWidget({
newsletterId: 'your-newsletter-id',
tenantId: 'your-tenant-id',
containerId: 'newsletter-container',
});
await widget.init();See individual package READMEs for detailed documentation.
This is a monorepo managed with pnpm workspaces.
- Node.js 18+
- pnpm 8+
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test
# Lint code
pnpm lint
# Type check
pnpm typecheck# Build all packages
pnpm build
# Watch mode (all packages)
pnpm dev
# Run tests with coverage
pnpm test:coverage
# Lint and fix
pnpm lint:fix
# Format code
pnpm format# Build specific package
pnpm --filter @nevent/core build
# Test specific package
pnpm --filter @nevent/subscriptions test
# Run all commands in a package
cd packages/core
pnpm build
pnpm testnev-sdks/
├── packages/
│ ├── core/ # Shared utilities
│ │ ├── src/
│ │ ├── dist/
│ │ └── package.json
│ └── subscriptions/ # Newsletter widget
│ ├── src/
│ ├── dist/
│ └── package.json
├── examples/
│ └── basic-html/ # HTML integration examples
├── .github/
│ └── workflows/ # CI/CD pipelines
├── package.json # Root package (workspace config)
├── pnpm-workspace.yaml # pnpm workspace definition
├── tsconfig.json # Base TypeScript config
├── vitest.config.ts # Test configuration
├── .eslintrc.js # Linting rules
└── README.md
See ARCHITECTURE.md for detailed architectural decisions and patterns.
See CONTRIBUTING.md for development workflow and guidelines.
We use Changesets for version management and changelog generation.
# Add a changeset for your changes
pnpm changeset
# Follow the prompts to select packages and change typesReleases are automated through GitHub Actions when changesets are merged to main.
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test:coverageCoverage thresholds are enforced:
- Lines: 80%
- Functions: 80%
- Branches: 75%
- Statements: 80%
- Chrome/Edge 88+
- Firefox 90+
- Safari 14+
- Modern mobile browsers
MIT
- Nevent Team
For issues and questions:
- GitHub Issues
- Email: support@nevent.es