grunt-ftps-deploy

0.1.16 • Public • Published

grunt-ftps-deploy

Deploy files to ftps server

Getting Started

This plugin requires Grunt ~0.4.5

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, you may install this plugin with this command:

npm install grunt-ftps-deploy --save-dev

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

grunt.loadNpmTasks('grunt-ftps-deploy');

The "ftps_deploy" task

Overview

In your project's Gruntfile, add a section named ftps_deploy to the data object passed into grunt.initConfig().

to avoid having the progress of the upload written to console, change or remove the options.silent parameter.

grunt.initConfig({
  ftps_deploy: {
    deploy: {
      options: {
        auth:{
          host:'0.0.0.0',
          port: 3000,
          authKey: 'key1',
          secure: true
        },
        silent:false
      },
      files: [{
        expand: true,
        cwd:'app',
        src: ['**/* ', '!**/*.html'],
        dest: '/utf8/3g/dyb/test'
      }]
    }
  }
})

.ftppass

{
  "key1": {
    "username": "ybduan",
    "password": "password"
  }
}

Others

  • Touch a file named .ftppass that contains your ftp username and password
  • If you are using ftp over SSL, secure must be true
  • Make sure path in files.dest are already exsit

Q&A

When you are pushing files to sftp, and meet with the following problem on windows

unable to load config info from /usr/local/ssl/openssl.cnf

plz download openssl first, and set this environment variable OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg for X86 OPENSSL_CONF=C:\OpenSSL-Win64\bin\openssl.cfg for X64

Readme

Keywords

Package Sidebar

Install

npm i grunt-ftps-deploy

Weekly Downloads

4

Version

0.1.16

License

none

Last publish

Collaborators

  • ybduan