Package Manager Installation
Install thelivecodes package in your project:
Package Details
- Package Name:
livecodes - Current Version: 0.13.0
- License: MIT
- Repository: github.com/live-codes/livecodes
CDN Usage
You can also use the SDK directly from a CDN without installation:ES Modules
UMD (Browser Global)
Importing the SDK
JavaScript/TypeScript
Import the main SDK functions and types:React
Import the React component:Vue
Import the Vue component:TypeScript Support
The SDK is written in TypeScript and includes complete type definitions. TypeScript users get full IntelliSense and type checking out of the box.Package Exports
The package provides the following exports:| Export | Type | Description |
|---|---|---|
. | ESM/CJS | Main SDK (createPlayground, getPlaygroundUrl) |
./react | ESM | React component |
./vue | ESM | Vue component |
./package.json | JSON | Package metadata |
Build Formats
The SDK is available in multiple formats:- ESM (
livecodes.js): For modern bundlers and<script type="module"> - CommonJS (
livecodes.cjs): For Node.js and older bundlers - UMD (
livecodes.umd.js): For browser<script>tags - TypeScript Definitions (
livecodes.d.ts): Type definitions
Bundler Configuration
Vite
No configuration needed. Vite handles the SDK automatically.Webpack
Next.js
For Next.js applications, you may need to configure transpilation:Version Requirements
- Node.js: 14.x or higher recommended
- TypeScript: 4.5 or higher (if using TypeScript)
- React: 16.8+ (if using React component)
- Vue: 3.x (if using Vue component)
Verify Installation
Create a simple test to verify the installation:Next Steps
Getting Started
Learn how to create your first embedded playground