This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 39
target_prompt
Marcel Kloubert edited this page Mar 26, 2018
·
8 revisions
Asks the user for a list of settings that will be applied to one or more other targets.
The following example lets the user input an username and password and writes these values to user
and password
settings of FTP server template
.
{
"deploy.reloaded": {
"targets": [
{
"type": "prompt",
"name": "FTP server",
"prompts": [
{
"text": "Please enter your username",
"properties": [ "user" ],
"defaultValue": "/my_package_files"
},
{
"placeHolder": "Please enter the password for '${user}'",
"isPassword": true,
"properties": [ "password" ]
}
],
"targets": [ "FTP server template" ]
},
{
"name": "FTP server template",
"type": "ftp",
"isHidden": true,
"user": "<NO NEED TO SET: This is done by 1st prompt of 'FTP server' target>",
"password": "<NO NEED TO SET: This is done by 2nd prompt of 'FTP server' target>"
}
]
}
}
Name | Description |
---|---|
prompts *
|
One or more prompt entry. This can also be a string, which contains a path or URI from where to download the entries from (relative and local paths will be mapped to your home directory (.vscode-deploy-reloaded sub folder) or the .vscode folder). |
targets |
One or more target name to deploy to. |
* supports placeholders
Name | Description |
---|---|
ignoreFocusOut |
Set to (true) to keep the input box open when focus moves to another part of the editor or to another window. Default: (true)
|
isPassword |
Input value is secret / a password. Default: (false)
|
placeHolder *
|
The placeholder for the input box. |
properties |
A list of one or more property names inside the target where to write the value to. |
type *
|
The value type. |
text *
|
The text for the input box. |
* supports placeholders
Name | Description |
---|---|
bool , boolean
|
Convert to a boolean value. Possible value for (true) are: 1 , true , yes or y ; possible value for (false) are: 0 , false , no or n . |
file |
Loads data from a file and parses it as JSON string. |
float , number
|
Convert to a number / float value. |
int , integer
|
Convert to an integer value. |
json , object , obj
|
Parses a value as JSON string. |
str , string
|
Does no conversion. |