Visual Studio Code で sftp
sftp の設定メモ
設定手順
Cmd+Shift+P から SFTP: config を選択
設定内容
/.vscode/sftp.json の設定内容
{
"protocol": "sftp",
"host": "[HostName]",
"username": "[UserName]",
"password": "[Password]",
"context": "themes", // ローカルフォルダ内で参照するパス
"remotePath": "/[WordPressFolder]/wp-content/themes/[ThemeName]", // リモートフォルダ先で参照(アップロード)するパス
"uploadOnSave": true, // 自動アップロード
"syncMode": "full", // これは必要かな....
// コンパイルされるファイルなどを監視する
"watcher": {
"files": "assets/css/*.{css,map}",
"autoUpload": true,
"autoDelete": true
},
"ignore": [".vscode", ".git", ".DS_Store", "sftp-config(-alt\\d?)?\\.json"]
}
ほか ssh する際などは公式参照する