Cake addin to watch files change - https://wk-j.github.io/cake-watch
C# PowerShell Shell Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.vscode
Assets
Cake.Watch.Console
Cake.Watch.Tests
Cake.Watch
Example
Tests
.gitignore
Cake.Watch.sln
LICENSE
README.md
RELEASE.md
_config.yml
build.cake
build.cmd
build.ps1
build.sh

README.md

Cake.Watch

Cake addin to watch files changed.

Install

#addin "nuget:?package=Cake.Watch"

Watch current path

Task("Watch-Only-Js")
    .Does(() => {
        Watch("*.js", (changes) => {
        	changes.ToList().ForEach(change => {
                Console.WriteLine(change.Status);
                Console.WriteLine(change.Name);
                Console.WriteLine(change.FullPath);
            });
        });
    });

Watch specific path

Task("Watch-With-Settings")
    .Does(() => {
        var settings = new WatchSettings {
            Recursive = true,
            Path = "./src",
            Pattern = "*.js"
        };
        Watch(settings, (changes) => {
            changes.ToList().ForEach(change => {
                Console.WriteLine(change.Status);
                Console.WriteLine(change.Name);
                Console.WriteLine(change.FullPath);
            });
        });
    });