# ftpkick

> A module that will literally kick all your files to a remote FTP server

Latest version **0.0.6** (published 2013-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install ftpkick
pnpm add ftpkick
yarn add ftpkick
bun add ftpkick
```

## 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.6 |
| Published | 2013-12-17 |
| First published | 2013-11-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Jarl Friis |
| Maintainers | saebekassebil |
| Keywords | ftp, sync, deploy, folder |

## Links

- npm: https://www.npmjs.com/package/ftpkick
- Repository: https://github.com/saebekassebil/ftpkick
- Issues: https://github.com/saebekassebil/ftpkick/issues
- npm.io page: https://npm.io/package/ftpkick

## Dependencies (2)

- [ftp](https://npm.io/package/ftp.md) ~0.3.5
- [promise](https://npm.io/package/promise.md) ~3.2.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.0.6 (latest) — 2013-12-17
- 0.0.5 — 2013-12-12
- 0.0.4 — 2013-12-12
- 0.0.3 — 2013-11-19
- 0.0.2 — 2013-11-19

## README

# ftpkick

Simply a module that kicks your folder out the door and up onto
your FTP server of choice. If you don't like the word "kick", then you're allowed
to silently replace it with "deploy" in your mind.

    $ npm install ftpkick

This module was heavily inspired by some code written by @jarl-dk in
CoffeeScript.

## Example

```javascript
var ftpkick = require('ftpkick');

var args = {
  host: 'mytesthost',
  user: 'developer',
  password: 'supersecret'
};

ftpkick.connect(args).then(function(kicker) {
  console.log('Uploading to /myfolder');
  kicker.kick('./build', '/myfolder').then(function() {
    console.log('Successfully uploaded to /myfolder');
    kicker.disconnect()
  }, function(e) {
    console.log('Failed to upload', e);
  });

  kicker.on('uploaded', function(file) {
    console.log('Uploaded file: ', file);
  });

  kicker.on('uploading', function(file) {
    console.log('Uploading file: ', file);
  });

  kicker.on('savedcheckfile', function(file) {
    console.log('Saved checkfile with path: ', file);
  });
});
```

## API
### `ftpkick.connect(parameters) -> Promise`

Connection `parameters` are directly passed on to
the [ftp package](https://github.com/mscdex/node-ftp), so go look there for docs.

The `.connect` function returns a [promise](https://github.com/then/promise.git)
of a `Connection` object.

### `Connection#kick(localDirectory, targetDirectory, checkfile) -> Promise`

As you might've guessed, the `localDirectory` is the directory you want to *kick*
while the `targetDirectory` is the target where all your files hopefully will
land.

The `checkfile` parameter, is an optional filename where the `ctime` of all
uploaded files will be stored. If provided `ftpkick` will check against this
file to make sure that it only uploads updated files. The checkfile is stored
in the OS' temporary directory.

The method returns a promise, that will resolve on success and reject on failure

### `Connection#disconnect()`

Call this when you want to end the FTP connection (after a `kick`)

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