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

code-workspace #34

Closed theking2 closed 1 year ago

theking2 commented 1 year ago

I have this in my code-workspace, but it seems not picked up by file watcher:

    "settings": {
        "filewatcher.commands": [
            {
                "watch": "CspTest/vendor/theking2/csp-builder/composer.json",
                "cmd": "composer dump-autoload",
                "event": "onFileChange",
                "isAsync": true,

            }
        ]
    },

is this correct here?

listgarten100 commented 1 year ago

hi @theking2, try this command settings scheme, for example ("match" is a required property):

    {
      "match": "^(?!.*@).*\\.ts$",
      "isAsync": true,
      "cmd": "cd '${workspaceRoot}'; node ./index.js '${file}'",
      "event": "onFileChange"
    },
]