Asset

Available goals

GoalToolProduct module
imp buildAsset//rules/asset

Targets

asset()

asset({ srcs })

Declare an asset target bundling a set of source glob patterns.

ParameterTypeDescription
optsobject
opts.srcsstring[]Source glob patterns, relative to the declaring BUILD.js.

Returns: object The declared target.

resourcePackage()

resourcePackage({ srcs, exclude = [], path = "." })

Declare a resource-package target: a set of files staged at a given path, for bundling into another target's sandbox (e.g. runtime data files).

ParameterTypeDescription
optsobject
opts.srcsstring[]Source glob patterns to include (required, non-empty).
[opts.exclude]string[]Glob patterns to exclude from srcs.
[opts.path]stringDirectory (relative to the declaring BUILD.js) the sources are staged under.

Returns: object The declared target.