UNPKG

@visulima/packem

Version:

A fast and modern bundler for Node.js and TypeScript.

30 lines (28 loc) 1.08 kB
import type { Pail } from "@visulima/pail"; import type { BuildConfig, Environment, Mode } from '../types.d.cts'; /** * Main entry point for the Packem bundler. * Handles the complete build process including configuration loading, validation, * and execution of the build/watch process. * * @param rootDirectory - Root directory of the project * @param mode - Build mode (build/watch) * @param environment - Build environment (development/production) * @param logger - Logger instance for output * @param inputConfig - User provided build configuration and options * * @example * ```typescript * import packem from 'packem'; * * await packem('/path/to/project', 'build', 'production', logger, { * debug: true, * configPath: './packem.config.js' * }); * ``` * * @throws {Error} If configuration validation fails or build process encounters errors * @public */ declare const packem: (rootDirectory: string, mode: Mode, environment: Environment, logger: Pail, debug: boolean, config: BuildConfig, tsconfigPath?: string) => Promise<void>; export = packem;