The official VS Code extension for Piral.
Available in the following marketplaces:
- VS Code Marketplace for VS Code
- Open VSX for VSCodium, code-server and Eclipse Theia
You'll need Node.js (v16+) with npm (v7+) installed for using the extension.
The extension works on all OS where VS Code is running.
This extension is a useful companion when developing Piral based app shells, or pilets for existing app shells.
It can be regarded as a visualizer for the piral-cli
command line utility. However, our plan is to extend it with more functionality, usually tied very closely to the VS Code editing experience.
Right now the following features are part of this extension:
- A workspace panel info with plugins, dependencies, versions, ...
- Additions to the command palette using useful commands (e.g.,
piral debug
) - A provider for
.codegen
files (essentially using JavaScript as language) - A wizard for scaffolding new projects (Piral instances or pilets)
- Additional debugging utilities and tools
- Start, build, validate, ... run all commands without a command line
When the extension detects a Piral instance or pilet folder opened it automatically fills some workspace information. The workspace info also contains links to documentation and helpful resources.
You can add provided tasks for your Piral instances or pilets.
piral: debug
- a build (watch) task to debug the Piral instancepiral: build
- a build task to build the Piral instancepiral: validate
- a test task to validate the Piral instancepiral: declaration
- a build task to generate the declaration for the Piral instancepilet: debug
- a build (watch) task to debug the piletpilet: build
- a build task to build the piletpilet: validate
- a test task to validate the piletpilet: pack
- a build task to pack the pilet
You can either run these tasks manually or use them, e.g., in a launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:1234",
"webRoot": "${workspaceFolder}",
"preLaunchTask": "pilet: debug"
}
]
}
If you make your own task using the piral-cli
you can use the $piral-cli-debug
problem matcher to monitor the piral debug
/ pilet debug
commands.
All commands that are relevant to Piral can be run from the command palette.
A new project can be scaffolded directly from VS Code. Right now two project types are supported.
When a Piral instance should be scaffolded additional information is requested. All options can be selected graphically.
When a pilet should be scaffolded additional information is requested. All options can be selected graphically.
With this extension you'll get support for *.codegen
files. This boils down to getting JS support associated with such files.
Clone the repository and install the dependencies using npm
:
npm i
Then open VS Code (code .
) and run it using F5
.
For publishing the official command line tool vsce
should be used.
vsce package
vsce publish -p <token>
This will package the current version of the repository and publish it. Make sure to have the right token specified. Follow the instructions outlined here to get a new one.