liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.51k stars 265 forks source link

Add localPath configuration #764

Open ghost opened 4 years ago

ghost commented 4 years ago

Is this a similar or duplicate feature request?

Is your feature request related to a problem? Please describe. The project root does not match the root of the files on the remote server.

Describe the solution you'd like Add localPath setting

jakehowell commented 4 years ago

I agree, unless this is what context is supposed to be used for, in which case it doesn't work. I keep getting the error "Config Not Found." when trying to route to a subfolder of the root project directory.

alexporto2200 commented 4 years ago

I use like this

[
  {
    "name": "server1folder1",
    "host": "host",
    "username": "username",
    "password": "password",
    "context": "/local/build",
    "remotePath": "/remote/project/build"
  },
  {
    "name": "server1folder2",
    "host": "host",
    "username": "username",
    "password": "password",
    "context": "/local/src",
    "remotePath": "/remote/project/src"
  }
]
b1oki commented 4 years ago

It would be great if I had the opportunity to define a deployment map.

Something like this:

{
  "host": "server",
  "uploadOnSave: true,
  "remoteMap": {
    "localFolder1": "remoteFolder1",
    "localFolder2": "remoteFolder2"
  }
}

Another way through the list allows you to upload one folder to several places:

{
  "host": "server",
  "uploadOnSave: true,
  "remoteMap": [
    ["localFolder1", "remoteFolder1"],
    ["localFolder2", "remoteFolder2"],
    ["localFolder2", "remoteFolder3]"
  ]
}

Not consistent types but give more simple config:

{
  "host": "server",
  "uploadOnSave: true,
  "remoteMap": {
    "localFolder1": "remoteFolder1",
    "localFolder2": ["remoteFolder2", "remoteFolder3"]
  }
}