Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

check_for_requirements

Marcel Kloubert edited this page Jan 26, 2018 · 7 revisions

Home >> Settings >> Check for requirements

Check for requirements

Defines one or more (JavaScript) code, which check for required things.

{
    "deploy.reloaded": {
        "checkForRequirements": [
            " 'my_host' === require('os').hostname() ",

            {
                "name": "Check for Linux",
                "condition": " 'linux' === process.platform ",
                "isMustHave": true
            }
        ]
    }
}

Possible Values

String (code)

Show an error message (true) and skip loading the configuration, when extension has not been found, or show a warning message instead (false).

{
    "deploy.reloaded": {
        "checkForRequirements": [
            " 'my_host' === require('os').hostname() "
        ]
    }
}

Object (settings)

{
    "deploy.reloaded": {
        "checkForRequirements": [
            {
                "name": "Check for hostname",
                "condition": " 'my_host' === require('os').hostname() "
            },

            {
                "name": "Check for Linux",
                "condition": " 'linux' === process.platform ",
                "isMustHave": true
            }
        ]
    }
}
Name Description
isMustHave Show an error message (true) and skip loading the configuration, if condition does not match, or show a warning message instead (false). Default: (false)
name The custom (display) name for the condition.
platforms One or more platform names the entry is for, s. process.platform
Clone this wiki locally