liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.5k stars 256 forks source link

Is there a config option to automatically upload generated files? #902

Open glebgolov-ziosem opened 3 years ago

glebgolov-ziosem commented 3 years ago

I've got a project with webpack that has a watcher that generates bundled files every time I save the related project files. I'd like to have the generated bundles to be automatically uploaded to the dev server, as of now my SFTP configuration uploads only the files saved by the user and the others must be always uploaded manually (with a right click on the file and a click on "Upload").

Is there a config option to automatically upload generated files?

Here is my current configuration:

// ...apart from host, port, username, password, privateKeypath and remotePath...
{
    "protocol": "sftp",
    "agent": null,
    "passphrase": null,
    "passive": false,
    "interactiveAuth": false,
    "uploadOnSave": true,
    "syncMode": "update",
    "watcher": {
        "files": "**/*",
        "autoUpload": false,
        "autoDelete": true
    },
    "ignore": [
        "**/.vscode/**",
        "**/.git/**",
        "**/.DS_Store",
        "**/node_modules"
    ]
}
makemagik commented 2 years ago

Hey, I had the same issue and used your code and it works fine. However, I changed the autoUpload to true.