UNPKG

@decaf-ts/utils

Version:

module management utils for decaf-ts

77 lines (76 loc) 2.28 kB
import { Command } from "../command"; import { CommandOptions } from "../types"; import { DefaultCommandValues } from "../constants"; import { LoggingConfig } from "@decaf-ts/logging"; declare module "@rollup/plugin-terser"; export declare function parseList(input?: string | string[]): string[]; export declare function packageToGlobal(name: string): string; export declare function getPackageDependencies(): string[]; declare enum Modes { CJS = "commonjs", ESM = "es2022" } declare enum BuildMode { BUILD = "build", BUNDLE = "bundle", ALL = "all" } declare const options: { prod: { type: string; default: boolean; }; dev: { type: string; default: boolean; }; buildMode: { type: string; default: BuildMode; }; includes: { type: string; default: string; }; externals: { type: string; default: string; }; docs: { type: string; default: boolean; }; commands: { type: string; default: boolean; }; banner: { type: string; default: boolean; }; }; export declare class BuildScripts extends Command<CommandOptions<typeof options>, void> { private replacements; private readonly pkgVersion; private readonly pkgName; constructor(); patchFiles(p: string): void; private reportDiagnostics; private formatDiagnostics; private readConfigFile; private evalDiagnostics; private preCheckDiagnostics; private checkTsDiagnostics; private buildTs; private build; copyAssets(mode: Modes): void; bundle(mode: Modes, isDev: boolean, isLib: boolean, entryFile?: string, nameOverride?: string, externalsArg?: string | string[], includeArg?: string | string[]): Promise<void>; private buildByEnv; buildDev(mode?: BuildMode, includesArg?: string | string[], externalsArg?: string | string[]): Promise<void>; buildProd(mode?: BuildMode, includesArg?: string | string[], externalsArg?: string | string[]): Promise<void>; buildDocs(): Promise<void>; protected run<R>(answers: LoggingConfig & typeof DefaultCommandValues & { [k in keyof typeof options]: unknown; }): Promise<string | void | R>; } export {};