Paul Gschwendtner e31be733b6 build: support substituting/stamping files other than package.json
Similart to `pkg_npm` from `rules_nodejs`, we should have a way to make
use of the stamp constants/placeholders throughout individual package
files. This is not possible at all with `rules_js`'s `npm_package` rule,
nor does it support stamp substitutions out of the box at all.

We have our own `expand_template` machinery to substitute `package.json`
files of npm archives, but we need to expand this to support arbitrary
files inside a package. This will be opt-in for explicitly listed files;
which is a good compromise for simplicity of supporting this.

This commit adds the necessary functionality and demonstrates the
feature by fixing `@angular/build`.
2025-01-13 19:19:06 +01:00
..