Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>vscode-plugin-sftpNew to Visual Studio Code? Get it now.

vscode-plugin-sftp

qyy

|
2,424 installs
| (1) | Free
sftp上传
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

基本功能

  1. 分为 3 个环境,可以分别上传 beta,dev,docker
  2. 可以上传单个文件,也可以上传文件夹. 上传文件夹时,不会上传当前环境配置的 ignore 字段中的文件
  3. 保存时,会遍历所有的环境配置,根据当前环境配置的 uploadOnSave 字段,决定是否自动上传当前文件到对应环境
  4. docker 环境可以配置上传的端口号,默认为空

注意事项

  1. 项目根目录需要新建 .vscode/sftp.json 文件. 该文件为上传配置,基本配置如下所示
  2. 存在多个项目时,需要在设置中勾选 '包含多个项目'

sftp.json 基本配置

[
  {
    name: "beta", // 上传的环境,不可更改
    host: "", // 上传的host地址
    port: "", // 上传地址的端口号
    username: "", // 上传地址的用户名
    password: "", // 上传地址的密码
    uploadOnSave: true, // 保存时自动上传
    remotePath: "", // 上传地址
    ignore: [
      ".vscode", // 不上传的文件,文件名
      "node_modules",
    ],
  },
  {
    name: "dev",
    host: "",
    port: "",
    username: "",
    password: "",
    uploadOnSave: true,
    remotePath: "",
    ignore: [".vscode", "node_modules"],
  },
  {
    name: "docker",
    host: "",
    port: "",
    username: "",
    password: "",
    uploadOnSave: true,
    remotePath: "",
    ignore: [".vscode", "node_modules"],
  },
];
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft