Deployment 使用grunt ssh递归复制文件
我尝试使用grunt ssh进行部署。但我只复制了文件夹的文件:Deployment 使用grunt ssh递归复制文件,deployment,gruntjs,grunt-ssh,Deployment,Gruntjs,Grunt Ssh,我尝试使用grunt ssh进行部署。但我只复制了文件夹的文件: sftp: { deploy: { files: { "./": "doc/*" }, options: { path: '<%= pkg.server.path %>', host: '<%= pkg.server.host %>', username: '<%= pkg.server.user %>',
sftp: {
deploy: {
files: {
"./": "doc/*"
},
options: {
path: '<%= pkg.server.path %>',
host: '<%= pkg.server.host %>',
username: '<%= pkg.server.user %>',
password: '<%= pkg.server.password %>',
showProgress: true,
srcBasePath: 'doc/'
}
}
}
sftp:{
部署:{
档案:{
“/”:“doc/*”
},
选项:{
路径:“”,
主机:“”,
用户名:“”,
密码:“”,
showProgress:没错,
srcBasePath:'doc/'
}
}
}
如何将整个本地文件夹及其子文件夹(递归)
doc
复制到远程?快速查看源代码解决了我的问题:
sftp: {
deploy: {
files: {
"./": "doc/**"
},
options: {
path: '<%= pkg.server.path %>',
host: '<%= pkg.server.host %>',
username: '<%= pkg.server.user %>',
password: '<%= pkg.server.password %>',
showProgress: true,
srcBasePath: 'doc/',
createDirectories: true
}
}
}
sftp:{
部署:{
档案:{
“/”:“doc/**”
},
选项:{
路径:“”,
主机:“”,
用户名:“”,
密码:“”,
showProgress:没错,
srcBasePath:'doc/',
createDirectories:true
}
}
}