Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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-ftpress

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,
				commandArray:
				[
					'mirror {SOURCE} {TARGET} --reverse --delete-first --parallel=10 --use-pget-n=10',
					'exit'
				],
				debug: false,
				verbose: false,
				haltOnError: false,
				errorArray:
				[
					'Connection refused',
					'Not connected',
					'Permission denied'
				]
			}
		}
	}
});

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

About

Grunt enhanced file transfer with speed in mind

Topics

Resources

Sponsor this project

 
You can’t perform that action at this time.