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
values
Marcel Kloubert edited this page Mar 13, 2018
·
10 revisions
Defines one or more values that can be accessed via placeholders.
{
"deploy.reloaded": {
"values": {
"outputDir": {
"type": "code",
"code": "require('os').homedir() + '/' + 'myOutputDir'"
}
},
"targets": [
{
"name": "My local target",
"type": "local",
"dir": "${outputDir}"
}
]
}
}
Name | Description |
---|---|
cache |
Cache value or not. Default: (true)
|
if |
(JavaScript) Code, which checks if is available or not. |
type |
The type. Default: static
|
The extension provides the following pre-defined values:
Name | Description |
---|---|
cwd |
The current directory of the process. |
EOL |
The string that represents an End-Of-Line. |
extensionDir |
The path to the extension's subfolder .vscode-deploy-reloaded inside the user's home directory. |
homeDir |
The home directory of the current user. |
hostName |
The hostname of the running machine. |
tempDir |
The path to the directory for the temporary files. |
userName |
The name of the current logged in user. |
code [↑]
A value generated by (JavaScript) code.
{
"deploy.reloaded": {
"values": {
"outputDir": {
"type": "code",
"code": "require('os').homedir() + '/' + 'myOutputDir'"
}
},
"targets": [
{
"name": "My local target",
"type": "local",
"dir": "${outputDir}"
}
]
}
}
Name | Description |
---|---|
code |
The (JavaScript) code to execute. |
env [↑]
A value that accesses an environment variable.
{
"deploy.reloaded": {
"values": {
"USERPROFILE": {
"type": "env",
"alias": "myHomeDir"
}
},
"targets": [
{
"name": "My local target",
"type": "local",
"dir": "${myHomeDir}/myOutputDir"
}
]
}
}
Name | Description |
---|---|
alias |
An optional, custom alias for the value name. If not define: name is used. |
file [↑]
A value from a file as string.
{
"deploy.reloaded": {
"values": {
"outputDir": {
"type": "file",
"file": "${homeDir}/outdir.txt"
}
},
"targets": [
{
"name": "My local target",
"type": "local",
"dir": "${outputDir}"
}
]
}
}
Name | Description |
---|---|
encoding |
The encoding to use for converting from binary data to string. Default: utf8
|
file *
|
The path to the file to load. |
format |
The target format to use. Default: string
|
* supports placeholders
In most cases, relative file paths will be mapped to the user's home directory (.vscode-deploy-reloaded
sub folder) or the settings folder of the underlying workspace (.vscode
sub folder).
format [↑]
Name | Description |
---|---|
b64 , base64
|
Base64 |
bin , binary , blob , buffer
|
Buffer |
json |
Handle as JSON string |
str , string
|
No conversion (string) |
template , tpl
|
Handle as string with other placeholders |
static [↑]
A static value.
{
"deploy.reloaded": {
"values": {
"outputDir": "/home/mkloubert/myOutputDir"
},
"targets": [
{
"name": "My local target",
"type": "local",
"dir": "${outputDir}"
}
]
}
}
Name | Description |
---|---|
value |
The value. |