All Projects → morris → Vinyl Ftp

morris / Vinyl Ftp

Licence: other
Blazing fast vinyl adapter for FTP

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vinyl Ftp

Gulp Ftp
[DEPRECATED] Upload files to an FTP-server
Stars: ✭ 100 (-74.03%)
Mutual labels:  gulp, ftp
Vs Deploy
Visual Studio Code extension that provides commands to deploy files of a workspace to a destination.
Stars: ✭ 123 (-68.05%)
Mutual labels:  ftp, deployment
Vscode Deploy Reloaded
Recoded version of Visual Studio Code extension 'vs-deploy', which provides commands to deploy files to one or more destinations.
Stars: ✭ 129 (-66.49%)
Mutual labels:  ftp, deployment
bitbucket-sync
Mirror of BitBucket Sync project hosted on BitBucket
Stars: ✭ 18 (-95.32%)
Mutual labels:  deployment, ftp
gitup
Laravel package to upload git commits to server(s) via (s)ftp.
Stars: ✭ 20 (-94.81%)
Mutual labels:  deployment, ftp
floyer
🚀 Floyer is simple and fast deployment tool using git/svn and (S)FTP - especially useful for shared hosting.
Stars: ✭ 57 (-85.19%)
Mutual labels:  deployment, ftp
envoyer-npm-deployment
Compile assets that depend on node packages using Laravel Envoyer deployment hooks
Stars: ✭ 43 (-88.83%)
Mutual labels:  gulp, deployment
anyfs
Portable file system for Node
Stars: ✭ 17 (-95.58%)
Mutual labels:  gulp, ftp
Gradle Play Publisher
GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.
Stars: ✭ 3,690 (+858.44%)
Mutual labels:  deployment
Post Tuto Deployment
Build and deploy a machine learning app from scratch 🚀
Stars: ✭ 368 (-4.42%)
Mutual labels:  deployment
Mix docker
Put your Elixir app production release inside minimal docker image
Stars: ✭ 335 (-12.99%)
Mutual labels:  deployment
Gulp Scss Starter
Frontend development with pleasure. SCSS version
Stars: ✭ 339 (-11.95%)
Mutual labels:  gulp
Openiothub
💖A free IoT (Internet of Things) platform and private cloud. [一个免费的物联网和私有云平台,支持内网穿透]
Stars: ✭ 371 (-3.64%)
Mutual labels:  ftp
Meteor Now
Instantly deploy your Meteor apps with `meteor-now`
Stars: ✭ 339 (-11.95%)
Mutual labels:  deployment
Bastille
Bastille is an open-source system for automating deployment and management of containerized applications on FreeBSD.
Stars: ✭ 377 (-2.08%)
Mutual labels:  deployment
Generator Jekyllized
A Yeoman generator for Jekyll to rapidly build sites using Gulp
Stars: ✭ 332 (-13.77%)
Mutual labels:  gulp
Linuxdeploy
Install and run GNU/Linux on Android
Stars: ✭ 3,775 (+880.52%)
Mutual labels:  deployment
Gulp Tutorial
Code examples for my Gulp.js tutorial series
Stars: ✭ 383 (-0.52%)
Mutual labels:  gulp
Aws Deployment Framework
The AWS Deployment Framework (ADF) is an extensive and flexible framework to manage and deploy resources across multiple AWS accounts and regions based on AWS Organizations.
Stars: ✭ 374 (-2.86%)
Mutual labels:  deployment
News.laravel China.org
Source Code of the https://news.laravel-china.org/ website, build on top of Laravel 5.1. Laravel 资讯网站源代码,使用 Laravel 5.1 构建
Stars: ✭ 363 (-5.71%)
Mutual labels:  gulp

vinyl-ftp

version downloads

Blazing fast vinyl adapter for FTP. Supports parallel transfers, conditional transfers, buffered or streamed files, and more. Often performs better than your favorite desktop FTP client.

Usage

Nice and gulpy deployment task:

var gulp = require( 'gulp' );
var gutil = require( 'gulp-util' );
var ftp = require( 'vinyl-ftp' );

gulp.task( 'deploy', function () {

	var conn = ftp.create( {
		host:     'mywebsite.tld',
		user:     'me',
		password: 'mypass',
		parallel: 10,
		log:      gutil.log
	} );

	var globs = [
		'src/**',
		'css/**',
		'js/**',
		'fonts/**',
		'index.html'
	];

	// using base = '.' will transfer everything to /public_html correctly
	// turn off buffering in gulp.src for best performance

	return gulp.src( globs, { base: '.', buffer: false } )
		.pipe( conn.newer( '/public_html' ) ) // only upload newer files
		.pipe( conn.dest( '/public_html' ) );

} );

Without Gulp:

var fs = require( 'vinyl-fs' );
var ftp = require( 'vinyl-ftp' );

var conn = new ftp( /* ... */ );

fs.src( [ './src/**' ], { buffer: false } )
	.pipe( conn.dest( '/dst' ) );

Remember not to push FTP credentials to public repos!

API

var ftp = require( 'vinyl-ftp' )

ftp.create( config )

Return a new vinyl-ftp instance with the given config. Config options:

  • host: FTP host, default is localhost
  • user: FTP user, default is anonymous
  • pass[word]: FTP password, default is [email protected]
  • port: FTP port, default is 21
  • log: Log function, default is null
  • timeOffset: Offset server time by this number of minutes, default is 0
  • parallel: Number of parallel transfers, default is 3
  • maxConnections: Maximum number of connections, should be greater or equal to "parallel". Default is 5, or the parallel setting. Don't worry about setting this too high, vinyl-ftp recovers from "Too many connections" errors nicely.
  • reload: Clear caches before (each) stream, default is false
  • idleTimeout: Time to keep idle FTP connections (milliseconds), default is 100
  • debug: A debug callback that gets extensive debug information, default is null
  • secure: Set true for secured FTP connections
  • secureOptions: Set { rejectUnauthorized: false } for self-signed or expired secure FTP connections

You can override parallel and reload per stream in their options.


var conn = ftp.create( config )

conn.src( globs[, options] ) STREAM

Returns a vinyl file stream that emits remote files matched by the given globs. The remote files have a file.ftp property containing remote information. Possible options:

  • cwd: Set as file.cwd, default is /.
  • base: Set as file.base, default is glob beginning. This is used to determine the file names when saving in .dest().
  • since: Only emit files modified after this date.
  • buffer: Should the file be buffered (complete download) before emitting? Default is true.
  • read: Should the file be read? Default is true. False will emit null files.

Glob-related options are documented at minimatch.


conn.dest( remoteFolder[, options] ) STREAM

Returns a transform stream that transfers input files to a remote folder. All directories are created automatically. Passes input files through.

conn.mode( remoteFolder, mode[, options] ) STREAM

Returns a transform stream that sets remote file permissions for each file. mode must be a string between '0000' and '0777'.

conn.newer( remoteFolder[, options] ) STREAM

Returns a transform stream which filters the input for files which are newer than their remote counterpart.

conn.differentSize( remoteFolder[, options] ) STREAM

Returns a transform stream which filters the input for files which have a different file size than their remote counterpart.

conn.newerOrDifferentSize( remoteFolder[, options] ) STREAM

See above.

conn.filter( remoteFolder, filter[, options] ) STREAM

Returns a transform stream that filters the input using a callback. The callback should be of this form:

function ( localFile, remoteFile, callback ) {

	// localFile and remoteFile are vinyl files.
	// Check remoteFile.ftp for remote information.
	// Decide wether localFile should be emitted and call callback with boolean.
	// callback is a function( error, emit )

	callback( null, emit );

}

conn.delete( path, cb ) CALLBACK

Deletes a file.

conn.rmdir( path, cb ) CALLBACK

Removes a directory, recursively.

conn.clean( globs, local[, options] ) STREAM

Globs remote files, tests if they are locally available at <local>/<remote.relative> and removes them if not.

Development

  • Run tests with CONFIG=test/config/yourserver.json npm test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].