# grunt-ftps-deploynew

> Deploy files to sftp server (fixed directory bug)

Latest version **0.0.3** (published 2022-03-10) · 0 weekly downloads

## Install

```sh
npm install grunt-ftps-deploynew
pnpm add grunt-ftps-deploynew
yarn add grunt-ftps-deploynew
bun add grunt-ftps-deploynew
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2022-03-10 |
| First published | 2022-03-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 1 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | gr33nw33n |
| Maintainers | gr33nw33n |
| Keywords | gruntplugin |

## Links

- npm: https://www.npmjs.com/package/grunt-ftps-deploynew
- npm.io page: https://npm.io/package/grunt-ftps-deploynew

## Dependencies (1)

- [ftp](https://npm.io/package/ftp.md) ^0.3.10

## Recent versions

- 0.0.3 (latest) — 2022-03-10
- 0.0.2 — 2022-03-10
- 0.0.1 — 2022-03-10

## README

# 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](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
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:

```js
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.

```js
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
```json
{
  "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](http://slproweb.com/products/Win32OpenSSL.html) 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

---
_Source: https://npm.io/package/grunt-ftps-deploynew · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
