mkloubert / vs-deploy

Visual Studio Code extension that provides commands to deploy files of a workspace to a destination.
https://marketplace.visualstudio.com/items?itemName=mkloubert.vs-deploy
MIT License
131 stars 24 forks source link

How to run "Deploy: Deploy workspace" on save? #165

Open 2u4uold opened 5 years ago

2u4uold commented 5 years ago

I need to deploy only bundle files (bundle.js and main-bundle.css) after they were changed (it happens with webpack) to glassfish folder.

I tried to use deployOnSave but it deploys src file which was actually saved. I came to this code:

{
    "deploy": {
        "packages": [{
            "name": "Version 1",
            "description": "Copy files to GF",
            "files": [
                "/bundle.js",
                "/master-bundle.css"
            ],
            "exclude": [
                "node_modules/**",
                "src/**"
            ],
            "deployOnSave": ["project"]
        }],
        "targets": [
            {
                "type": "local",
                "name": "project",
                "description": "Copy files to GF",
                "dir": "C:/root/to/file"
            }
        ]
    }
}

But is works only when I run "Deploy: Deploy workspace" and doesn't work when I save files with "Deploy: Srart/stop listening for remote files".

Is there any way I can run "Deploy: Deploy workspace" on file save?