// Pug options interface PugPluginOpts { /** * The root directory of all absolute inclusion. * * It defaults to the Rollup `input` option if it is a string, or the current * working directory if `input` is anything else. */ basedir?: string, /** * If set to `true`, the function source will be included in the compiled * template for better error messages (sometimes useful in development). * It is enabled by default, unless used with Express in production mode. * @default false */ compileDebug?: boolean, /** * If set to `true`, the tokens and function body are logged to stdout. * @default false */ debug?: boolean, /** * If the `doctype` is not specified as part of the template, this value will be used. * It is sometimes useful to get self-closing tags and remove mirroring of boolean attributes. * See [doctype documentation](https://pugjs.org/language/doctype.html#doctype-option) for more information. * @default "html" */ doctype?: string, /** * Hash table of [custom filters](https://pugjs.org/language/filters.html#custom-filters). * @default undefined */ filters?: object, /** * List of global names to make accessible in templates. * * _NOTE: The default ones with be merged with your globals, if any._ * @default ['Array','Boolean','Date','Function','Math','Number','Object','RegExp','String','Symbol'] */ globals?: string[], /** * Inline runtime functions instead of `import`-ing them from a shared version. * @default false */ inlineRuntimeFunctions?: boolean, /** * Adds whitespace to the resulting HTML to make it easier for a human to read using `' '` * as indentation. If a string is specified, that will be used as indentation instead * (e.g. `'\t'`). * * We strongly recommend against using this option. Too often, it creates * subtle bugs in your templates because of the way it alters the interpretation and * rendering of whitespace, and so this feature is going to be removed. * @deprecated */ pretty?: boolean | string, /** * Use a `self` namespace to hold the locals. It will speed up the compilation, but * instead of writing variable you will have to write `self.variable` to access a * property of the locals object. * @default false */ self?: boolean, // Brunch plugin options /** * Plain JavaScript object with values passed to the compiler for _static_ compilation. * @default {} */ locals?: { [k: string]: any }, /** * Brunch convention.assets folder as string. * This is the root of static templates. */ staticBasedir?: string, /** * Pug's `pretty` option for files in staticBasedir. * @since v2.8.5 */ staticPretty?: boolean | string, /** * When `preCompile:true`, limit pre-compilation to matching files. * @since v2.8.6 */ preCompilePattern?: RegExp, /** * Custom Pug runtime filename. * This option can be set to `false` to avoid importing the runtime, but you must * provide an equivalent `import` accessible to the template. * @default true */ pugRuntime?: boolean, /** * Honors brunch sourceMaps (with 's') value. * @default true * @since v2.8.4 */ sourceMap?: boolean, } type PugOwnOpts = Pick & { filename: string }