stages
ts
const stages: object;
Defined in: server/transform/index.ts:10
Individual document transformation stages.
Type declaration
build
ts
build: object;
build.asset()
ts
asset: (asset, merges?) => Promise<void> = build;
Default HTML builder for supported asset types (images and video).
Parameters
asset
merges?
Returns
Promise
<void
>
build.CONTAINER_ATTR
ts
CONTAINER_ATTR: string;
build.size()
ts
size: (asset) => object = resolveSize;
Resolves dimensions of the specified asset accounting build preferences and aspect ratio.
Parameters
asset
Returns
object
height
ts
height: number;
width
ts
width: number;
build.source()
ts
source: (path) => string = resolveSource;
Resolves serve url for content file with specified full path based on configured root option.
Parameters
path
string
Returns
string
capture
ts
capture: object;
capture.assets()
ts
assets: (content, assets) => void = capture;
Uses regexp defined in options to capture the assets syntax.
Parameters
content
string
assets
Returns
void
encode
ts
encode: object;
encode.asset()
ts
asset: (asset) => Promise<void> = encode;
Encodes asset content with ffmpeg.
Parameters
asset
Returns
Promise
<void
>
fetch
ts
fetch: object;
fetch.asset()
ts
asset: (asset) => Promise<void> = fetch;
Fetches asset's source content.
Parameters
asset
Returns
Promise
<void
>
probe
ts
probe: object;
probe.asset()
ts
asset: (asset) => Promise<void> = probe;
Probes asset content with ffprobe.
Parameters
asset
Returns
Promise
<void
>
resolve
ts
resolve: object;
resolve.asset()
ts
asset: (asset) => void = resolve;
Resolves asset types supported by default.
Parameters
asset
Returns
void
resolve.spec()
ts
spec: (query) => AssetSpec = resolveSpec;
Resolves spec formatted as URL query parameters.
Parameters
query
string
Returns
rewrite
ts
rewrite: object;
rewrite.content()
ts
content: (content, assets) => string = rewrite;
Default rewrite procedure.
Parameters
content
string
assets
Returns
string