{ "staged": { "doc": ["Stage data to a logical subdirectory."] , "target_fields": ["srcs"] , "string_fields": ["stage"] , "field_doc": { "srcs": ["The files to be staged"] , "stage": [ "The logical directory to stage the files to." , "Individual directory components are joined with \"/\"." ] } , "artifacts_doc": [ "The runfiles of the \"srcs\" targets staged to the directory" , "specified in \"stage\"." ] , "runfiles_doc": ["Same as artifacts"] , "imports": {"runfiles": ["./", "..", "field_runfiles"]} , "expression": { "type": "let*" , "bindings": [ [ "stage" , { "type": "join" , "separator": "/" , "$1": {"type": "FIELD", "name": "stage"} } ] , [ "srcs" , { "type": "let*" , "bindings": [["fieldname", "srcs"]] , "body": {"type": "CALL_EXPRESSION", "name": "runfiles"} } ] , [ "staged" , { "type": "to_subdir" , "subdir": {"type": "var", "name": "stage"} , "$1": {"type": "var", "name": "srcs"} } ] ] , "body": { "type": "RESULT" , "artifacts": {"type": "var", "name": "staged"} , "runfiles": {"type": "var", "name": "staged"} } } } }