Converted @rollup/html to a standalone package (out of the original monorepo) and made it ESM-native

This commit is contained in:
2023-04-17 21:04:05 +02:00
commit 2dc701c5b7
21 changed files with 4923 additions and 0 deletions

28
types/index.d.ts vendored Normal file
View File

@@ -0,0 +1,28 @@
import type { Plugin, OutputChunk, OutputAsset, OutputBundle } from 'rollup';
export interface RollupHtmlTemplateOptions {
title: string;
attributes: Record<string, any>;
publicPath: string;
meta: Record<string, any>[];
bundle: OutputBundle;
files: Record<string, (OutputChunk | OutputAsset)[]>;
}
export interface RollupHtmlOptions {
title?: string;
attributes?: Record<string, any>;
fileName?: string;
meta?: Record<string, any>[];
publicPath?: string;
template?: (templateoptions?: RollupHtmlTemplateOptions) => string;
}
export function makeHtmlAttributes(attributes: Record<string, string>): string;
/**
* A Rollup plugin which creates HTML files to serve Rollup bundles.
* @param options - Plugin options.
* @returns Plugin instance.
*/
export default function html(options?: RollupHtmlOptions): Plugin;