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

deploy_on_change

Marcel Kloubert edited this page Dec 25, 2017 · 6 revisions

Home >> Packages >> Deploy on change

Deploy on change

Deploys a file automatically when it is changed by user or something else like a background service.

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "My project",
                
                "deployOnChange": true,

                "files": [
                    "**/*.css",
                    "**/*.js"
                ],

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

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

Possible values

As boolean value

The following example deploys any file of the package, by using its target list (My test target).

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "My project",
                
                "deployOnChange": true,

                "files": [
                    "**/*.css",
                    "**/*.js"
                ],

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

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

As array / target list

Deploys any file of the package, by using an own target list (My local FTP server).

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "My project",
                
                "deployOnChange": [ "My local FTP server" ],

                "files": [
                    "**/*.css",
                    "**/*.js"
                ]
            }
        ],

        "targets": [        
            {
                "name": "My local FTP server",
                "type": "ftp"
            }
        ]
    }
}

As object / file filter

Deploys the files of the package, by using minimatch sub filters (**/*.min.css and **/*.min.js), to My ZIP target.

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "My project",
                
                "deployOnChange": {
                    "files": [
                        "**/*.min.css",
                        "**/*.min.js"
                    ],

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

                "files": [
                    "**/*.css",
                    "**/*.js"
                ],

                "targets": [ "My 2nd ZIP target" ]
            }
        ],

        "targets": [        
            {
                "name": "My ZIP target",
                "type": "zip"
            },

            {
                "name": "My 2nd ZIP target",
                "type": "zip"
            }
        ]
    }
}

If you do not define a target list in deployOnChange property, the list of targets from package is used (here: My 2nd ZIP target).

Clone this wiki locally