Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

deploy_on_change

Marcel Kloubert edited this page Apr 11, 2017 · 9 revisions

Home >> Packages >> Deploy on change

Deploy on change

For example: You develope a website and you use preprocessors like less or JavaScript compilers like TypeScript.

In combination with extensions like Easy LESS, you can create CSS output automatically, when you save your LESS files in VS Code.

The problem is, that you have to deploy the CSS files manually.

And this is "deploy on change" feature is for!

You can define a list of files, using glob patterns, that should be deployed when they are changed (by you or something else) and the editor deploys it for you, based on your package settings!

{
    "deploy": {
        "packages": [
            {
                "name": "My project",
                
                "deployOnChange": {
                    "files": [
                        "/**/*.css",
                        "/**/*.js"
                    ],
                    "exclude": [
                        "/**/*.less",
                        "/**/*.ts"
                    ],
                    "useTargetList": true
                },

                "files": [
                    "wwwroot/**/*.html",
                    "wwwroot/**/*.php"
                ],

                "targets": [ "My test target" ]
            }
        ],

        "targets": [        
            {
                "name": "My test target",
                "type": "test"
            }
        ]
    }
}

In that example, all .css and .js files will be deployed to My test target if they are changed.

You also can set deployOnChange to (true), what means, that you have to setup deployOnSave property.

If you DO NOT set useTargetList to (true), you have to setup deployOnSave property.

Clone this wiki locally