nuxt-prepare
Version:
Build actions for Nuxt
54 lines (51 loc) • 1.65 kB
text/typescript
import * as _nuxt_schema from '@nuxt/schema';
interface PrepareScript {
file: string;
runOnNuxtPrepare?: boolean;
}
interface ModuleOptions {
/**
* Accepts a list of prepare scripts to run. The scripts are executed in the
* order they are defined.
*
* @remarks
* You can omit the file extension. Supported extensions are: `.js`, `.mjs`, `.ts`.
*
* @default ['server.prepare']
*/
scripts: string | string[] | PrepareScript | PrepareScript[];
/**
* If `true`, the prepare scripts will be run in parallel.
*
* @remarks
* This can be useful if you have multiple scripts that can be run independently.
*
* @default false
*/
parallel?: boolean;
/**
* If `true`, the module will not throw an error if a script fails.
*
* @remarks
* Ensure to add `ok: false` to your script's return value to indicate that
* the script failed. Otherwise, the module will assume that the script
* succeeded.
*
* @default false
*/
continueOnError?: boolean;
/**
* Whether the scripts should be run on `nuxi prepare`.
*
* @remarks
* If set to `false`, all scripts will be ignored when running `nuxi prepare`. If you want to
* exclude specific scripts, use the object syntax for the `scripts` option and set the
* `runOnNuxtPrepare` property individually for each script.
*
* @default true
*/
runOnNuxtPrepare?: boolean;
}
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
export = _default;
export type { ModuleOptions, PrepareScript };