UNPKG

piral-cli

Version:

The standard CLI for creating and building a Piral instance or a Pilet.

70 lines (69 loc) 1.96 kB
import { LogLevels } from '../types'; export interface DebugPiralOptions { /** * Sets the path to the entry file. */ entry?: string; /** * Sets the target directory where the output of the bundling should be placed. */ target?: string; /** * Sets the port to use for the debug server. */ port?: number; /** * Forces the set port to be used, otherwise exists with an error. */ strictPort?: boolean; /** * Sets the publicUrl to use. * By default, the server is assumed to be at root "/". */ publicUrl?: string; /** * Sets the log level to use (1-5). */ logLevel?: LogLevels; /** * Sets if the (system default) browser should be auto-opened. */ open?: boolean; /** * Defines if hot module reloading (HMR) should be integrated for faster debugging. */ hmr?: boolean; /** * Sets the bundler to use for building, if any specific. */ bundlerName?: string; /** * Sets the relative path to the krasrc, if any. */ krasrc?: string; /** * States if the node modules should be included for target transpilation */ optimizeModules?: boolean; /** * The URL of a pilet feed(s) used to include locally missing pilets. */ feed?: string | Array<string>; /** * Additional arguments for a specific bundler. */ _?: Record<string, any>; /** * Hooks to be triggered at various stages. */ hooks?: { onBegin?(e: any): Promise<void>; beforeBuild?(e: any): Promise<void>; afterBuild?(e: any): Promise<void>; beforeOnline?(e: any): Promise<void>; afterOnline?(e: any): Promise<void>; onEnd?(e: any): Promise<void>; }; } export declare const debugPiralDefaults: DebugPiralOptions; export declare function debugPiral(baseDir?: string, options?: DebugPiralOptions): Promise<void>;