Function: pack()
pack(
input
,options
?):Promise
<BuildResult
>
Defined in: index.ts:50
Unified high-level API: bundle a local file or remote URL (with optional recursion). Creates its own logger based on options.logLevel
unless options.loggerInstance
is provided.
Parameters
input
string
File path or remote URL (http/https).
options?
Partial
<PackOptions
> = {}
Configuration options, including optional loggerInstance
, recursive
depth, logLevel
, etc.
Returns
Promise
<BuildResult
>
A Promise resolving to an object containing the bundled HTML (html
) and build metadata (metadata
).
Throws
Will throw an error if the input protocol is unsupported or file reading/network fetching fails.