VSCode UI Scripting
This VSCode plugin aims to deliver a configurable UI context toolset that will allow quicker development within your team and projects.
- If you need to create a custom scaffold for your project structure - creating a new component with a required set of sub elements etc.
- Generating a large set of objects or data based off of templates.
- and anything else you can think of.
You need to create a
vus-config.json file in the root of the project.
it must list the commands you will be able to use later. here you will give your command a name you can reference later in an allowed commands config and a command that will be used to run after all inputs have been gathered. There is an optional property to customize how the command is laid out, and the default value is displayed in the
vus-config.json example below using the
commandTemplate property. We also provide the ability to disable the default inheritance of commands.
- "default" | undefined
- or a string template that contains one or more of the following:
- "<baseCommand>" - this is a required parameter.
- "<answers>" - this is required if you have questions as part of your command.
This property is true by default, and when disabled prevents this command from being used by sub directories of the vus-meta.json file - where it has been specified for use.
So each command can have a set of questions that will require input. As seen below you can have 3 variations:
- text input
- quick single pick
- quick multiselect (canPickMany boolean)
With regards to the quick pick options, if you specify the values field in a question it will automatically be converted to quick pick prompt. The detail field of the values will be used when calling the command you have designated.
If a user does not provide an answer for one of your questions it will default to
., but if you would like to specify something else, you just need to add
defaultAnswerValue to your vus-config.json, see below. Spaces don't work so great when working with space sperated command line parameters ;)
"command": "node index.js addComponent",
"commandTemplate": "<baseCommand> <directoryContext> <answers>",
"prompt": "What is your component name?",
"placeholder": "Enter component name..."
"prompt": "Select additional files to generate",
"placeholder": "Select additional files to generate",
"Description": "Component CSS stylesheet",
"Description": "Component README.md",