Skip to content

Commit

Permalink
Mention synthetic inputs (#3297)
Browse files Browse the repository at this point in the history
Fixes #3296

Adds a mention about synthetic inputs and how to detect them when using an empty string as a build extension key.
  • Loading branch information
jakemac53 authored May 3, 2022
1 parent 04e5357 commit 61c484d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/writing_a_builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ will trigger a build step, and the expected output will have the extension
appended. For example with the configuration `{'': ['.foo', '.bar']}` all files
will be passed as a primary input, and each build step may produce two assets.
For the primary input `some_file.txt` the allowed outputs are
`some_file.txt.foo` and `some_file.txt.bar`.
`some_file.txt.foo` and `some_file.txt.bar`. Note that you will also see the
synthetic inputs when using this approach (`$package$` etc). You can detect
synthetic inputs by doing a `buildStep.canRead(buildStep.inputId)` check, if
you can't read it then you know it is not a normal file.

### Capture groups

Expand Down

0 comments on commit 61c484d

Please sign in to comment.