import { type RollupOptions } from "rollup"; import { Target as CopyTarget } from "rollup-plugin-copy"; import { type HeaderOptions } from "../header"; import { type OptionalOptions } from "../util"; export interface GRCOptions { /** * Where to look for files when inlining assets into CSS. */ assets: string; /** * Additional files to be copied. */ copyTargets: { /** * These will be copied relative to the root of each bundle (esnext, * standalone…). */ bundle: CopyTarget[]; /** * These will be copied relative to the root of each variant of each bundle * (esnext/esm, esnext/umd, standalone/esm…). */ variant: CopyTarget[]; }; /** * The base dir with entry points for various builds. The extensions * determines whether TypeScript processing will be used. */ entryPoints: string; /** * These are the dependencies that would cause interoperability issues if they * were bundled. A notable example here is vis-data. */ externalForPeerBuild: string[]; /** * Passed straight to Rollup. */ globals: Record; /** * Options for {@link generateHeader}. */ header: Partial; /** * This will be used as a file name with appropriate extensions appended * (like .js, .min.js or .css). */ libraryFilename: string; /** * Simply required package.json. */ packageJSON: Partial<{ browser: string; dependencies: Record; devDependencies: Record; exports: Record | undefined>; files: string[]; jsnext: string; main: string; module: string; peerDependencies: Record; types: string; }>; /** * The path to tsconfig.json to be used in this build. */ tsconfig: string; } /** * Prepare ready to use Rollup configuration file. * @remarks * IMPORTANT: Use `babel.config.js` in the root of the project, `.babelrc` files * are ignored. * * Plugins: * - `\@rollup/plugin-babel` (skipped in ESNext) * - `\@rollup/plugin-commonjs` * - `\@rollup/plugin-json` * - `\@rollup/plugin-node-resolve` * - `\@rollup/plugin-terser` (only in minified) * - `postcss-assets` * - `rollup-plugin-copy` * - `rollup-plugin-postcss` * - `rollup-plugin-typescript2` (skipped if the entry is .js) * @param options - See {@link GRCOptions}. * @param mode - Whether the code should be processed for production, * development or testing. * @returns Ready to use configuration object that can be just exported from * `rollup.config.js` or mutated in any way if necessary. */ export declare function generateRollupConfiguration(options: OptionalOptions, mode?: "production" | "development" | "test"): Promise; //# sourceMappingURL=index.d.ts.map