Open mkustermann opened 2 weeks ago
As some hooks may depend on the contents of a directory (e.g. add all fonts of a directory), we may need to add a concept of
output.addDirectoryDependency({bool recursive})
to the dependency tracking system.
addDependency
already enables specifying a directory. However, we do not have a recursive option. Do we need a recursive option or should we simply tell users to use package:glob
to do so and provide only a shallow logic that closely mimics the JSON.
addDependency already enables specifying a directory. However, we do not have a recursive option. Do we need a recursive option or should we simply tell users to use package:glob to do so and provide only a shallow logic that closely mimics the JSON.
It has to be a feature of the build system, because adding a new file into the directory (or subdirectories) has to re-trigger an invocation of hook/build.dart
.
Update: Ah, you mean that a user would recursively list all directories, add those as dependencies and then any new sub-dir/file would trigger a re-run. Yeah, that could work, but seems a little strange.
As some hooks may depend on the contents of a directory (e.g. add all fonts of a directory), we may need to add a concept of
output.addDirectoryDependency({bool recursive})
to the dependency tracking system.