gulp-scp2

0.2.0 • Public • Published

gulp-scp2 Build Status Coverage Status

Copy file to remote server, using scp2 that is a pure javascript implement.


Install

$ npm install gulp-scp2 -g

Usage

var gulp = require('gulp');
var scp = require('gulp-scp2');

gulp.task('default', function() {
  return gulp.src('**/*.js')
  .pipe(scp({
    host: 'localhost',
    username: 'username',
    password: 'password',
    dest: '/home/username/'
  }))
  .on('error', function(err) {
    console.log(err);
  });
});

More see example

Options

options.host

Type: String Default value: localhost

A string value that is the host of the server.

options.port

Type: Number Default value: 22

The ssh port of the server.

options.username

Type: String Default value: admin

The username of the server.

options.password

Type: String

The password of the user on the remote server.

options.dest

Type: String Default value: /home/username

Remote server directory

options.watch

Type: Function

You can get the client instance, and watch events.

More Options

  • host
  • port
  • hostHash
  • hostVerifier
  • username
  • password
  • agent
  • privateKey
  • passphrase
  • publicKey

Read more: https://github.com/mscdex/ssh2#connection-methods

LISENCE

Copyright (c) 2015 popomore. Licensed under the MIT license.

Package Sidebar

Install

npm i gulp-scp2

Weekly Downloads

366

Version

0.2.0

License

MIT

Last publish

Collaborators

  • popomore