@serpent/rollup-kits
Version:
serpent rollup kits
55 lines (54 loc) • 2.37 kB
TypeScript
import tsConfigPaths from 'rollup-plugin-ts-paths';
import replace from '@rollup/plugin-replace';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import alias from '@rollup/plugin-alias';
import inject from '@rollup/plugin-inject';
import run from '@rollup/plugin-run';
import json from '@rollup/plugin-json';
import typescript from '@rollup/plugin-typescript';
import { terser } from 'rollup-plugin-terser';
import builtins from 'builtin-modules';
import type { RollupOptions, OutputOptions } from 'rollup';
export interface StripParam {
include?: string | RegExp | (string | RegExp)[];
exclude?: string | RegExp | (string | RegExp)[];
debugger?: boolean;
sourceMap?: boolean;
functions?: string[];
labels?: string[];
}
export interface UrlParam {
include?: string | string[];
exclude?: string | string[];
limit?: number;
publicPath?: string;
emitFiles?: boolean;
fileName?: string;
sourceDir?: string;
destDir?: string;
}
declare const strip: (param?: StripParam) => any;
declare const url: (param?: UrlParam) => any;
export { resolve, commonjs, json, typescript, terser, builtins, RollupOptions, OutputOptions };
export declare function customTerser(arg?: Parameters<typeof terser>[0]): import("rollup").Plugin;
export declare function getPlugins(options?: {
tsConfigPaths?: boolean | Parameters<typeof tsConfigPaths>[0];
run?: boolean | Parameters<typeof run>[0];
replace?: boolean | Parameters<typeof replace>[0];
strip?: boolean | Parameters<typeof strip>[0];
alias?: boolean | Parameters<typeof alias>[0];
inject?: boolean | Parameters<typeof inject>[0];
resolve?: boolean | Parameters<typeof resolve>[0];
url?: boolean | Parameters<typeof url>[0];
commonjs?: boolean | Parameters<typeof commonjs>[0];
json?: boolean | Parameters<typeof json>[0];
typescript?: boolean | Parameters<typeof typescript>[0];
terser?: Parameters<typeof terser>[0];
}): {
normalPlugins: any[];
minifyPlugins: any[];
};
export declare function getExternal(pkg?: any): (source: string, importer: string | undefined, isResolved: boolean) => boolean | null | undefined;
export declare function getRootDir(): string;
export declare function getEntryMap(names: string[], map: (name: string) => string): Record<string, string>;