# web-app-ftp-publish

> With FTP Server,publish the build files of ReactJS App and Vue App to the web server target directory.

Latest version **0.1.5** (published 2019-12-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install web-app-ftp-publish
pnpm add web-app-ftp-publish
yarn add web-app-ftp-publish
bun add web-app-ftp-publish
```

## 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.1.5 |
| Published | 2019-12-21 |
| First published | 2019-12-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | breakeris |
| Maintainers | breakeris |
| Keywords | publish, react, vue, ftp, webapp |

## Links

- npm: https://www.npmjs.com/package/web-app-ftp-publish
- Repository: https://github.com/breakeris/web-app-ftp-publish
- Homepage: https://github.com/breakeris/web-app-ftp-publish.git
- Issues: https://github.com/breakeris/web-app-ftp-publish/issues
- npm.io page: https://npm.io/package/web-app-ftp-publish

## Dependencies (1)

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

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2019-12-21
- 0.1.4 — 2019-12-21
- 0.1.3 — 2019-12-21
- 0.1.2 — 2019-12-21
- 0.1.1 — 2019-12-21
- 0.1.0 — 2019-12-21

## README

Description
===========

With FTP Server,publish the build files of ReactJS App and VueJS App to the web server target directory.The advantages are as follows:

   *  No residual history files.During the publishing , The catalog json of the current version  will be generated . Files that are no longer referenced in the current version will be deleted after uploaded.
    
 * Optimize the publish order of files. To prevent online users from accessing your web application, the specified  entry file (such as: index.html) will be uploaded last

Install
=======

    npm i web-app-ftp-publish


Examples
========

* Publish new build files to FTP Directory:

```javascript
 const Publisher = require(`web-app-ftp-publish`);
 const path = require('path');
 
 
 let publisher = new Publisher({
     ftp:{
         host: "",
         port: "",
         user: "",
         password: "",
     }, // Required.Ftp configuration object. The FTP configuration document is linked here : https://github.com/mscdex/node-ftp#methods
     targetPath: path.resolve(__dirname + "/./build"), // Required. the absolute path of  the  build directory
     indexFileName:"index.html", // Optional.  Build directory's  index filename . default 'index.html'
     destPath:"/react/build", // Optional. The ftp destination directory. default "/',ftp server root  directory
     catalogFileName:"build-dir-catalog" //Optional . Catalog json file name.default 'catalog.json'
 });
 
 publisher.resume();
```
Configuration
-------

* **ftp**  - Required.Ftp configuration object. The FTP configuration document is linked here : [https://github.com/mscdex/node-ftp#methods](https://github.com/mscdex/node-ftp#methods)

* **targetPath** - Required. the absolute path of  the  build directory

* **indexFileName**  - Optional.  Build directory's  index filename . default 'index.html'.

* **destPath**  -  Optional. The ftp destination directory. default "/',ftp server root  directory.

* **catalogFileName**  - Optional . Catalog json file name.default 'catalog.json'


>  Reminder: The tool uses FTP Passive mode for uploading. If connecting/uploading timeout, please check whether the server has enough ports available for FTP upload.

Methods
-------

* **resume**() _(void)_  .

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