An open API service indexing awesome lists of open source software.

https://github.com/ambar/vscode-live-code

Interactive code playground: https://marketplace.visualstudio.com/items?itemName=ambar.live-code
https://github.com/ambar/vscode-live-code

editor live-code repl vscode vscode-extension

Last synced: 9 months ago
JSON representation

Interactive code playground: https://marketplace.visualstudio.com/items?itemName=ambar.live-code

Awesome Lists containing this project

README

          

# Live Code

[![test workflow](https://github.com/ambar/vscode-live-code/actions/workflows/test.yml/badge.svg)](https://github.com/ambar/vscode-live-code/actions/workflows/test.yml)

Interactive code playground.

![screenshot-1](./example/screenshot-1.png)

## Features

- Automatically evaluate all top-level expressions
- Support multiple environments (browser/Node.js, can be configured in settings, or switch by clicking the `Change Platform` button in the title bar)
- Support TypeScript/JSX
- Support URL imports
- Support custom [paths](https://www.typescriptlang.org/tsconfig/#paths) in tsconfig or jsconfig
- Support top-level await (browser only)
- Render JSX elements (browser only)

## Usage

Open _Command Palette_, choose `Live Code: Open Preview to the Side`, or simply click the preview button in the title, or use the shortcut `cmd` + `k l`.

## Requirements

- [Node.js](https://nodejs.org/) v12+

## Extension Settings

```json
{
"liveCode.renderJSX": {
"type": "boolean",
"default": true,
"description": "Wether to render JSX elements in the preview panel (browser platform only)"
},
"liveCode.showLineNumbers": {
"type": "boolean",
"default": true,
"description": "Wether to show line numbers in the preview panel"
}
}
```