[FR]: Support Expanding a filegroup via a rule #790
Labels
confirmation needed
Waiting on confirmation of resolution from reporter before closing
enhancement
New feature or request
What is the current behavior?
There is no rule for this.
Describe the feature
I'm in the unique position where I need to expand an npm package and copy each individual file out of the package from
external
to another place in my WORKSPACE. If I were to usecopy_to_directory
, I can move the files around but I lose the granularity of each file and Bazel only sees a directory when I pass tots_project
. This means that I can't use that rule to bulk move files around.I found this stackoverflow from a few years back that outlines a simple approach where in you can pass a
filegroup
to this rule and it makes an output for each file in the output group. https://stackoverflow.com/a/57983629Having this be in bazel-lib would be fairly useful because then I can add a
filegroup
to the npm package which I then reference and expand anywhere. Going one step further, I expectreplace_prefix
or similar to exist on the rule such that I can strip out part of the source path and rewrite it for the destination path. e.g. if my source path isexternal/my_package/package/src
I would want to rewrite it tomy_package/src
The text was updated successfully, but these errors were encountered: