Skip to content

exitIfScriptDisabled

Exits the process successfully, before any work, when the npm script currently running has been switched off: it writes Skipped (<VAR> is off). and calls process.exit(0).

Call it first in a script entry point that does not go through wrapCliTask, which already calls it.

Import:

import { exitIfScriptDisabled } from '@mnaoumov/typescript-dev-toolkit/env-toggle';

Signature:

function exitIfScriptDisabled(): void

Returns: void


Links to this page: