Asset
Developer reference: this page includes exported implementation details. BUILD authors should prefer the User API reference.
sources
const sources
Undocumented.
Asset (implementation class)
class Asset
Implementation class. BUILD files should use asset().
Undocumented.
bundle
const bundle
Undocumented.
asset()
asset({ srcs })
Declare an asset target bundling a set of source glob patterns.
| Parameter | Type | Description |
|---|---|---|
| opts | object | |
| opts.srcs | string[] | Source glob patterns, relative to the declaring BUILD.js. |
Returns: object The declared target.
resources
const resources
Undocumented.
ResourcePackage (implementation class)
class ResourcePackage
Implementation class. BUILD files should use resourcePackage().
Undocumented.
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).
| Parameter | Type | Description |
|---|---|---|
| opts | object | |
| opts.srcs | string[] | Source glob patterns to include (required, non-empty). |
| [opts.exclude] | string[] | Glob patterns to exclude from srcs. |
| [opts.path] | string | Directory (relative to the declaring BUILD.js) the sources are staged under. |
Returns: object The declared target.