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

sync_when_open

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

Home >> Packages >> Sync when open

Sync when open

This feature synchronizes files from a remote target when opening in the editor automatically.

This happens:

  • when the file can be downloaded from remote
  • the remote file is newer
  • the local file has NOT been changed while the current editor session

Settings

As object

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "My project",
                
                "files": [
                    "/**/*.php"
                ],

                "syncWhenOpen": true,

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

        "targets": [        
            {
                "name": "My test target",
                "type": "test"
            }
        ]
    }
}
Name Description
exclude Files to exclude (s. node-glob).
files Files to include (s. node-glob). Default: **

As string (target name)

You can define the name of the target, that is used to sync files from.

In that case the patterns of the underlying package are used.

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

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

                "syncWhenOpen": "My test target"
            }
        ],

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

As boolean value

You can define if the feature is activated for all files of the underlying package or not.

In that case the target list (targets) of the underlying package is used.

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

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

                "syncWhenOpen": true,

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

        "targets": [        
            {
                "name": "My test target",
                "type": "test"
            }
        ]
    }
}
Clone this wiki locally