0.0.3 • Published 2 years ago

grunt-ftps-deploynew v0.0.3

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

grunt-ftps-deploynew (also works if all directories exist on server!)

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-deploynew --save-dev

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

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

The "ftps_deploynew" task

Overview

In your project's Gruntfile, add a section named ftps_deploynew 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_deploynew: {
    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

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago