grunt-ftp

Upload files to an FTP-server

npm install grunt-ftp
6 downloads in the last day
18 downloads in the last week
92 downloads in the last month

grunt-ftp Build Status

Upload files to an FTP-server

Useful for uploading and deploying things.

Getting Started

If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a gruntfile as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:

npm install --save-dev grunt-ftp

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-ftp');

Tip: the load-grunt-tasks module makes it easier to load multiple grunt tasks.

Example

grunt.initConfig({
    ftp: {                                            // Task
        options: {                                    // Options
            host: 'website.com',
            user: 'johndoe',
            pass: '1234'
        },
        upload: {                                    // Target
            files: {                                // Dictionary of files
                'public_html': 'src/*'                // remote destination : source
            }
        }
    }
});

grunt.loadNpmTasks('grunt-ftp');
grunt.registerTask('default', ['ftp']);

Options

host

Required
Type: String

port

Type: Number
Default: 21

user

Type: String
Default: 'anonymous'

pass

Type: String
Default: '@anonymous'

License

MIT © Sindre Sorhus

npm loves you