Skip to content
This repository was archived by the owner on Jun 13, 2021. It is now read-only.

Conditional Settings

mkloubertego edited this page Jan 2, 2019 · 13 revisions

Home :: Conditional Settings

Many settings support an if property, which, when defined, executes (JavaScript) code to check if a condition matches or not.

The following example, runs an 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' ) "
            }
        ]
    }
}

Clone this wiki locally