grunt-sftp-deploy не умеет удалять файлы/папки, он умеет только копировать файлы/папки на хостинг, а так же обновлять их, если они обновились.
Gruntfile.js
--------------
'sftp-deploy': { // умеет заменять файлы/папки, но не умеет удалять
build: {
auth: {
host: 'ssh.myhost.com',
port: 22,
authKey: 'key1'
},
cache: 'sftpCache.json',
src: 'build/',
dest: './',
exclusions: [
'/path/to/source/folder/**/.DS_Store',
'/path/to/source/folder/**/Thumbs.db',
'dist/tmp'
],
serverSep: '/', // Useful if you deploy from Windows to Unix
concurrency: 4, // to define the number of concurrent file transfer
progress: true // to display or not the progress bar
}
}
Gruntfile.js
--------------
'sftp-deploy': { // умеет заменять файлы/папки, но не умеет удалять
build: {
auth: {
host: 'ssh.myhost.com',
port: 22,
authKey: 'key1'
},
cache: 'sftpCache.json',
src: 'build/',
dest: './',
exclusions: [
'/path/to/source/folder/**/.DS_Store',
'/path/to/source/folder/**/Thumbs.db',
'dist/tmp'
],
serverSep: '/', // Useful if you deploy from Windows to Unix
concurrency: 4, // to define the number of concurrent file transfer
progress: true // to display or not the progress bar
}
}