CodeSwing — Interactive Coding Playground (like CodePen, JSFiddle, etc.) Extension for Visual Studio Code

The Visual Studio Code extension named “CodeSwing” just blew my socks off. CodeSwing is an interactive coding playground for VS Code, that allows you to build/explore/learn rich web applications (“swings”). It’s like having the magic of a traditional web playground (e.g. CodePen, JSFiddle), but in Visual Studio Code! Using the Command Palette you can create …


This content originally appeared on Bram.us and was authored by Bramus!

The Visual Studio Code extension named “CodeSwing” just blew my socks off.

CodeSwing is an interactive coding playground for VS Code, that allows you to build/explore/learn rich web applications (“swings”). It’s like having the magic of a traditional web playground (e.g. CodePen, JSFiddle), but in Visual Studio Code!

~

Using the Command Palette you can create a new Swing in a directory. Here I’ve chosen for the classic HTML/CSS/JS (cfr. CodePen).

Using the “Add Library” command one can quickly import ES Modules, without needing to install any package. This is possible thanks to the wonderful SkyPack.

~

As you’d expect, you choose your own layout

~

The rendering engine is powered by Chromium, so you can use its DevTools.

The version of Chrome that’s bundled with the extension (or is it the Chromium that Electron uses?), is Chrome 91. Because it’s bundled, you can’t set any feature flags — such as Experimental Web Platform Features to enable Scroll-Linked Animations — on it.

~

CodeSwing also has support for React/Svelte/Vue and preprocessors.

When you create swings, you can use your favorite web languages (HTML/Pug, CSS/SCSS/Less, JS/TS) and libraries (React, Vue, Angular, etc.) and have a live preview as you type, without needing to worry about compiling or bundling anything. It’s like a visual REPL for managing runnable code snippets.

In the video below I quickly create a React Component:

~

There’s a ton of more stuff to dig into — such as exporting your Swing to CodePen — detailed in the README.

And oh, if go to codeswing.dev you get redirected to GitHub’s CodeSpaces with a preloaded CodeSwing.

Visual Studio Marketplace: Codeswing →
Codeswing Source (GitHub) →


This content originally appeared on Bram.us and was authored by Bramus!


Print Share Comment Cite Upload Translate Updates
APA

Bramus! | Sciencx (2021-09-30T14:14:00+00:00) CodeSwing — Interactive Coding Playground (like CodePen, JSFiddle, etc.) Extension for Visual Studio Code. Retrieved from https://www.scien.cx/2021/09/30/codeswing-interactive-coding-playground-like-codepen-jsfiddle-etc-extension-for-visual-studio-code/

MLA
" » CodeSwing — Interactive Coding Playground (like CodePen, JSFiddle, etc.) Extension for Visual Studio Code." Bramus! | Sciencx - Thursday September 30, 2021, https://www.scien.cx/2021/09/30/codeswing-interactive-coding-playground-like-codepen-jsfiddle-etc-extension-for-visual-studio-code/
HARVARD
Bramus! | Sciencx Thursday September 30, 2021 » CodeSwing — Interactive Coding Playground (like CodePen, JSFiddle, etc.) Extension for Visual Studio Code., viewed ,<https://www.scien.cx/2021/09/30/codeswing-interactive-coding-playground-like-codepen-jsfiddle-etc-extension-for-visual-studio-code/>
VANCOUVER
Bramus! | Sciencx - » CodeSwing — Interactive Coding Playground (like CodePen, JSFiddle, etc.) Extension for Visual Studio Code. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/09/30/codeswing-interactive-coding-playground-like-codepen-jsfiddle-etc-extension-for-visual-studio-code/
CHICAGO
" » CodeSwing — Interactive Coding Playground (like CodePen, JSFiddle, etc.) Extension for Visual Studio Code." Bramus! | Sciencx - Accessed . https://www.scien.cx/2021/09/30/codeswing-interactive-coding-playground-like-codepen-jsfiddle-etc-extension-for-visual-studio-code/
IEEE
" » CodeSwing — Interactive Coding Playground (like CodePen, JSFiddle, etc.) Extension for Visual Studio Code." Bramus! | Sciencx [Online]. Available: https://www.scien.cx/2021/09/30/codeswing-interactive-coding-playground-like-codepen-jsfiddle-etc-extension-for-visual-studio-code/. [Accessed: ]
rf:citation
» CodeSwing — Interactive Coding Playground (like CodePen, JSFiddle, etc.) Extension for Visual Studio Code | Bramus! | Sciencx | https://www.scien.cx/2021/09/30/codeswing-interactive-coding-playground-like-codepen-jsfiddle-etc-extension-for-visual-studio-code/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.