israelroldan / grunt-ssh

SSH, SFTP tasks for Grunt.
https://npmjs.org/package/grunt-ssh
MIT License
244 stars 70 forks source link

More features #132

Open marty-krishner opened 8 years ago

marty-krishner commented 8 years ago

Hi,

would you like to work on more features like remove,rename, download files

seinick commented 6 years ago

While there are workarounds, it would be nice if the SFTP task supported a "rename:" function in the same way that, say, grunt-contrib-copy or grunt-aws-s3 support it. For example here is a rename function used in an aws_s3 file upload process.


files: [
    { dest: '/', 'action': 'delete' },
    {
        expand: true,
        cwd: './dist',
        src: ['**','!**/urlConfig.json'],
        dest: '/',
        rename: function (dest, src) {
            return dest + src.replace('.production', '');
        }
    }
]