-
-
Notifications
You must be signed in to change notification settings - Fork 43
Home >> if
Many settings like shell commands, packages or targets support an if property, which contains JavaScript code which indicates if a setting is currently available/usable or not.
{
"deploy.reloaded": {
"executeOnStartup": [
{
"command": "npm install",
"if": " !require('fs').existsSync( $v['workspaceroot'] + '/node_modules' ) "
}
]
}
}The upper shell command is only executed, if NO node_modules folder is found in the root directory of the underlying workspace.
A special object of the underlying setting / object.
An object that stores all placeholders, which are available in that context as object.
The variable names can be accessed as properties in lower case format.
Short version of JavaScript's eval.
Short version of NodeJS's require, which includes a module the same way, as you are working as extension code. This makes extension modules and modules from package.json also available for you
The helper module of that extension.