This repository has been archived by the owner on Jun 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for dynamically matching targets
There is a basis protocol (Target) which exposes match? for whether or not a target matches. A sequential search is then performed over all targets for each input target. Example usage of this feature: ``` ;; Machfile.edn {#mach/glob "*.md" {product "somefile" produce (str "# A title")}} $ mach hello.md Writing somefile ``` Further functionality that is necessary to make this feature useful is the exposure of the match ctx (already assoced onto the target when it matches) so that code can refer to the full path. To extend the example above, the future feature should allow the product to be set based on the matching input. I haven't thoroughly tested this, so a second pair of eyes over this would be good.
- Loading branch information
1 parent
bdf218f
commit 3805280
Showing
2 changed files
with
97 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters