appulate / vscode-file-watcher

Extension for Visual Studio Code allows configuring commands that get run whenever a file is saved or folder is changed in vscode.
MIT License
39 stars 22 forks source link
typescript vscode-extension

File & Folder Watcher

This extension allows configuring commands that get run whenever a file is saved (changed, deleted, renamed, created) or folder is changed (deleted, created) in vscode.

Features

Configuration

Add "filewatcher" configuration to user or workspace settings.

Placeholder Tokens

Commands support placeholders similar to tasks.json.

Samples

File content change tracking example. Configuration in .vscode\settings.json

{
    "filewatcher.commands": [
        {
            "match": "\\.ts*",
            "isAsync": true,
            "cmd": "echo '${file} file content Changed'",
            "event": "onFileChange"
        }       
    ]
}

 screencast

Folder content change tracking example. Configuration in .vscode\settings.json

{
    "filewatcher.commands": [
        {
            "match": "\\.*",
            "isAsync": true,
            "cmd": "echo '${file} folder content Changed'",
            "event": "onFolderChange"
        }       
    ]
}

 screencast