Grunt enhanced file transfer with speed in mind
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tasks
tests
.eslintrc
.gitignore
.travis.yml
README.md
gruntfile.js
index.js
option.json
package.json

README.md

Grunt Ftpress

Grunt enhanced file transfer with speed in mind.

Build Status NPM Version Licensen

Installation

apt-get install lftp
npm install grunt-lftpress

Usage

Load the task:

grunt.loadNpmTasks('grunt-ftpress');

Config the task:

grunt.initConfig(
{
	ftpress:
	{
		name:
		{
			src:
			[
				'build'
			],
			dest: '.',
			options:
			{
				url: null,
				username: null,
				password: null,
				protocol: 'ftp',
				host: null,
				port: 21,
				command:
				[
					'mirror {SOURCE} {TARGET} --reverse --delete-first --parallel=10 --use-pget-n=10',
					'exit'
				],
				debug: false
			}
		}
	}
}

Zero downtime pattern:

command:
[
	'mirror {SOURCE} {TARGET}-new-{TIMESTAMP} --reverse --delete-first',
	'mv {TARGET} {TARGET}-old-{TIMESTAMP}',
	'mv {TARGET}-new-{TIMESTAMP} {TARGET}',
	'rm -rf {TARGET}-old-{TIMESTAMP}',
	'exit'
]

Run the task:

grunt ftpress