addOutput method

void addOutput(
  1. Asset asset,
  2. Asset output
)

Registers a generated output as being produced by an asset.

This tracks the relationship between source files and their generated outputs.

asset is the source asset. output is the generated output asset.

Implementation

void addOutput(Asset asset, Asset output) {
  assert(assets.containsKey(asset.id), 'Asset not found: ${asset.shortUri}');
  outputs.putIfAbsent(asset.id, () => <String>{}).add(output.id);
}