Socket
Socket
Sign inDemoInstall

simple-ftp-deploy

Package Overview
Dependencies
67
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    simple-ftp-deploy

A node library that simplifies the usage of ftp-deploy package


Version published
Weekly downloads
21
increased by110%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

1.0.5

Publishing date: 2023-10-27

  • Build: Update ftp-deploy

Readme

Source

simple-ftp-deploy

npm version

A node library that simplifies the usage of ftp-deploy

Instalation

npm i simple-ftp-deploy --save-dev

Repository configuration

Create the auth file

# .deploy/auth.json
{
  "host": "ftp.someserver.com",
  "user": "user",
  "password": "password",
  "port": 21
}

If you wish to place this file on another path, point the new auth config path into your package.json:

# package.json
{
  "ftp": {
    "authFile": "./new-path/auth.json"
  }
}

Recommendation: Do NOT commit the file containing your FTP credentials. Put it on .gitignore, or somewhere outside your project's repository

Create the deploy config file

# .deploy/config.json
{
  "localRoot": "/local-folder",
  "remoteRoot": "/public_html/remote-folder/",
  "include": ["*.php", "dist/*", ".*"],
  "exclude": ["dist/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
  "deleteRemote": false,
  "forcePasv": true,
  "sftp": false
}

To see all config options, check ftp-deploy

If you wish to place this file on another path, point the new auth config path into your package.json:

# package.json
{
  "ftp": {
    "configFile": "./new-path/config.json"
  }
}

Script Command

After creating all config files, include a new script on your package.json

# package.json
{
  "scripts": {
    "deploy": "simple-ftp-deploy"
  }
}

Keywords

FAQs

Last updated on 27 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc