UNPKG

create-gfm-fixtures

Version:
84 lines 2.44 kB
/** * Finds markdown files in `url` and generates HTML files for them if they’re * a) missing or b) `UPDATE` is in env. * * @param {Readonly<URL>} url * URL to folder with fixtures. * @param {Readonly<Options> | null | undefined} [options] * Configuration (optional). * @returns {Promise<undefined>} * Promise to nothing. */ export function createGfmFixtures(url: Readonly<URL>, options?: Readonly<Options> | null | undefined): Promise<undefined>; /** * Keep certain parts of GHs pipelines (default: `false`). */ export type Keep = { /** * Keep `camo.githubusercontent.com` on images (default: `false`). */ camo?: boolean | null | undefined; /** * Keep `dir="auto"` (default: `false`). */ dir?: boolean | null | undefined; /** * Keep visible frontmatter (default: `false`). */ frontmatter?: boolean | null | undefined; /** * Keep `.anchor` in headings (default: `false`). */ heading?: boolean | null | undefined; /** * Keep `max-width:100%` on images and `a[target=_blank]` parent wrapper * (default: `false`). */ image?: boolean | null | undefined; /** * Keep `.issue-link`s (default: `false`). */ issue?: boolean | null | undefined; /** * Keep `rel="nofollow"` on links (default: `false`). */ link?: boolean | null | undefined; /** * Keep attributes on `.user-mention`s (default: `false`). */ mention?: boolean | null | undefined; /** * Keep the `markdown-accessiblity-table` custom element * around tables (default: `false`). */ table?: boolean | null | undefined; /** * Keep classes on tasklist-related elements and `id` on their inputs * (default: `false`). */ tasklist?: boolean | null | undefined; }; /** * Configuration (optional). */ export type Options = { /** * Handle control pictures (default: `false`). */ controlPictures?: boolean | null | undefined; /** * Keep certain parts of GHs pipeline (optional). */ keep?: Keep | null | undefined; /** * Configuration passed to `hast-util-to-html` (optional). */ toHtml?: ToHtmlOptions | null | undefined; }; /** * Transform. */ export type Transform = (tree: Root) => undefined; import type { Options as ToHtmlOptions } from 'hast-util-to-html'; import type { Root } from 'hast'; //# sourceMappingURL=index.d.ts.map