getDisabledScriptEnvVariableName
Resolves the off switch for the npm script that is currently running, loading ENV_FILE_PATH first.
The script name comes from npm itself, so no script has to declare its own switch. When the script was started directly rather than through npm, there is no name to derive from and nothing is ever skipped.
Import:
import { getDisabledScriptEnvVariableName } from 'obsidian-dev-utils/script-utils/env-toggle';Signature:
function getDisabledScriptEnvVariableName(): string | nullReturns: string | null — The name of the environment variable that switched the current script off, or null when the script should run.
Links to this page: