UNPKG

piral-cli

Version:

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

92 lines (91 loc) 2.57 kB
import { LogLevels, PiletSchemaVersion } from '../types'; export interface DebugPiletOptions { /** * Sets the log level to use (1-5). */ logLevel?: LogLevels; /** * Sets the paths to the entry modules. */ entry?: string | Array<string>; /** * The target file of bundling. * @example './dist/index.js' */ target?: string; /** * Overrides the name of the app shell to use. * By default the app is inferred from the package.json. */ app?: string; /** * Overrides the directory of the app to serve when * debugging. */ appInstanceDir?: string; /** * Sets if the (system default) browser should be auto-opened. */ open?: boolean; /** * 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 maximum number of parallel build processes. */ concurrency?: number; /** * 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 schema to be used when bundling the pilets. * @example 'v1' */ schemaVersion?: PiletSchemaVersion; /** * 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>; beforeApp?(e: any): Promise<void>; afterApp?(e: any): Promise<void>; beforeOnline?(e: any): Promise<void>; afterOnline?(e: any): Promise<void>; onEnd?(e: any): Promise<void>; }; } export declare const debugPiletDefaults: DebugPiletOptions; export declare function debugPilet(baseDir?: string, options?: DebugPiletOptions): Promise<void>;