Skip to content

deploy_on_save

Marcel Kloubert edited this page Apr 11, 2018 · 4 revisions

Home >> Packages >> Deploy on save

Deploy on save

Deploys a file automatically when it is saved by user in the editor.

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "My project",
                
                "deployOnSave": 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",
                
                "deployOnSave": 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",
                
                "deployOnSave": [ "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",
                
                "deployOnSave": {
                    "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 deployOnSave, the list of targets from package is used (here: My 2nd ZIP target).

Buttons

You can setup a (global) button, which can activate or deactivate the feature:

{
    "deploy.reloaded": {
        "deployOnSaveButton": true
    }
}

Possible values

As boolean value

Indicates if a button should be shown or not.

{
    "deploy.reloaded": {
        "deployOnSaveButton": true
    }
}

As object

Settings for a button.

{
    "deploy.reloaded": {
        "deployOnSaveButton": {
            "text": "Change deploy on save state.",
            "tooltip": "Click here to save state",
            "color": "#fff"
        }
    }
}
Name Description
color The custom (text) color.
enabled Enable button or not. Default: (true)
isRight Put button on the right side or not. Default: (false)
priority The priority.
text* The custom display text.
tooltip* The custom tooltip text.

* supports placeholders

You can’t perform that action at this time.