grunt-ftp

Upload files to an FTP-server

grunt-ftp

Upload or Download files to / from an FTP-Server

Useful for uploading, deploying and downloading things.

$ npm install --save-dev grunt-ftp
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks 
 
grunt.initConfig({
    ftpPut: {
        options: {
            host: 'website.com',
            user: 'johndoe',
            pass: '1234'
        },
        upload: {
            files: {
                'public_html': 'src/*'
            }
        }
    }
});
 
grunt.registerTask('default', ['ftpPut']);
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks 
 
grunt.initConfig({
    ftpGet: {
        options: {
            host: 'website.com',
            user: 'johndoe',
            pass: '1234'
        },
        download: {
            files: {
                'public_html/file.txt': 'src/file.txt'
            }
        }
    }
});
 
grunt.registerTask('default', ['ftpGet']);

Required
Type: string

Type: number
Default: 21

Type: string
Default: 'anonymous'

Type: string
Default: '@anonymous'

MIT © Sindre Sorhus