The DAG based incremental rebuilding will require a better file watcher that can whats entire directories and automatically recheck build rules when a new file is created.
```go
type WatchListener func(path string) error
type Watcher interface {
// OnFileChange will register a file change listener
OnFileChange(l WatchListener)
// OnFileAdded will register a file creation listener
OnFileAdded(l WatchListener)
// Watch will register "path"
Watch(path string) error
// Watch will register files matching "pattern" and all directories along the way for new files
Cabret is a yaml based static site generator, ideally with the same features as Hugo but with a simpler model. Here is a simple example of a _Cabretfile.yaml_
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Beatae ratione eos saepe veritatis, temporibus nemo vero rerum earum voluptatibus minus voluptatem neque consequatur necessitatibus, error magnam deserunt! Ad, accusantium excepturi?
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Beatae ratione eos saepe veritatis, temporibus nemo vero rerum earum voluptatibus minus voluptatem neque consequatur necessitatibus, error magnam deserunt! Ad, accusantium excepturi?
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Beatae ratione eos saepe veritatis, temporibus nemo vero rerum earum voluptatibus minus voluptatem neque consequatur necessitatibus, error magnam deserunt! Ad, accusantium excepturi?
// Operation should have at least one key in "source", "use", "target". The remaining keys are options for that operation
typeOperationmap[string]any
typePipelinestruct{
Pipeline[]Operation`yaml:"pipeline"`
// Pipeline is a list of operations, each one should have at least one key in "source", "use", "target". The remaining keys are options for that operation
// switchMapHasKey returns a function that returns true if the map "m" contains the given key and binds the corresponding value to the provided "target" pointer, useful for writing map key checks using a switch instead of an if chain
// Match takes a path "s" and matches it against this pattern and returns whether it matched and in that case a map containing all captures for this pattern. This will throw an error if it can't compile the internal regex (should never happen).