2026-04-15 13:44:40 -04:00
2026-04-14 23:15:07 -04:00
2026-04-15 13:35:45 -04:00
2026-04-15 13:35:45 -04:00
2026-04-15 13:35:45 -04:00
2026-04-14 23:15:07 -04:00
2026-04-15 13:44:40 -04:00
2026-04-14 23:15:07 -04:00
2026-04-14 23:15:07 -04:00
2026-04-15 13:44:40 -04:00
2026-04-14 23:15:07 -04:00

CodeSwing Playground (DSI)

A local CodePen-like development environment for VS Code, powered by a locally built version of CodeSwing (originally by lostintangent) and the custom DSI Swing Navigator extension.

Important

Automatic Extension Installation: Opening this workspace will automatically build and install two essential extensions (CodeSwing and DSI Swing Navigator) to your current VS Code profile. To avoid cluttering your main environment, it is highly recommended to use a dedicated VS Code profile for this project.

How to use a dedicated Profile:

  • CLI: Run code --profile "CodeSwing" . to open the project in a new or existing profile named "CodeSwing".
  • VS Code UI: Click the Manage gear icon (bottom left) -> Profiles -> Create Profile... -> Name it "CodeSwing" and select it before opening the workspace.

Tip

Navigator Placement: You can move the Swings Navigator (Library icon) to the top of your sidebar by simply clicking and dragging it to your preferred position in the VS Code Activity Bar.

Features

  • Automated Workflow: Bootstrap script handles environment setup, including packaging and installing BOTH required extensions from local source.
  • Native TypeScript & SCSS Support: CodeSwing natively handles compilation of script.ts and style.scss within each swing. No external build step required.
  • Live Preview: Real-time updates as you code with built-in preview support for TS/SCSS.
  • Swing Navigator: A dedicated VS Code sidebar for browsing, creating, and opening playgrounds with integrated search and context menus.

Project Structure

  • swings/: Contains all your playground projects.
    • _template/: The blueprint for new swings.
  • shared/: Shared TypeScript definitions and global resources.
  • extensions/:
    • codeswing/: Source code for the modified CodeSwing extension.
    • swing-navigator/: Source code for the custom Navigator sidebar extension.
  • scripts/: Automation scripts for building, environment management, and utilities.

Getting Started

1. Bootstrap the Environment

Run the bootstrap command to build and install the extensions:

npm run bootstrap

Note: This script detects your VS Code profile and installs the extensions specifically for that profile.

2. Create a New Swing

Use the Navigator sidebar (+) button or run:

npm run new-swing my-cool-idea

3. Open a Swing

In the Swings Navigator sidebar (Library icon), double-click on any swing to open it.

Development Workflow

  1. Code directly: Edit script.ts, style.scss, and index.html in the swing's root directory.
  2. Live Preview: CodeSwing automatically compiles and reloads the preview as you save your source files.
  3. Bootstrap/Shared: Use shared/ts/global.d.ts for global type definitions if needed.
Description
No description provided
Readme 313 KiB
Languages
TypeScript 92.1%
JavaScript 5.5%
CSS 2.2%
SCSS 0.1%