Conditional Settings - egodigital/vscode-powertools GitHub Wiki

Many settings support an if property, which, when defined, executes (JavaScript) code to check if a condition matches or not, and decides if the underlying entry should be handled (or is available).

The following example, runs a npm install on startup, only if node_modules folder does not exist.

{
    "ego.power-tools": {
        "startup": [
            {
                "command": "npm install",

                "if": " !$fs.existsSync( $v['workspaceRoot'] + '/node_modules' ) "
            }
        ]
    }
}

The complete list of functions, modules and constants, can be found at the Executable Settings page.