1.0.5 • Published 2 years ago
simple-ftp-deploy v1.0.5
simple-ftp-deploy
A node library that simplifies the usage of ftp-deploy
Instalation
npm i simple-ftp-deploy --save-devRepository 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"
  }
}1.0.5
2 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.0.1-beta.2
4 years ago
0.0.1-beta.1
4 years ago
0.0.1-beta.0
4 years ago