0.1.1 • Published 1 year ago

@masatomakino/gulptask-deploy-ftp v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

gulptask-deploy-ftp

Thin ftp-deploy wrapper for gulp.js

MIT License Build

Getting Started

Install

npm install --save-dev gulp

and

npm install --save-dev https://github.com/MasatoMakino/gulptask-deploy-ftp.git

Run in gulpfile.js

The first step is to create an auth.json file.

{
  "user": "user_name",
  "password": "password",
  "host": "host.name.example",
  "remoteRoot": "/dir/to/public_html",
  "port": 21
}

This file contains the FTP authentication information. In this example, this file is stored in ~/.ftp_auth/auth.json.

The next step is to write gulpfile.js.

const os = require("os");
const path = require("path");

const { deploy } = require("gulptask-deploy-ftp").generateTasks({
  authFilePath: path.resolve(os.homedir(), ".ftp_auth", "auth.json"),
});

exports.deploy = deploy;

path.resolve(os.homedir(), ".ftp_auth", "auth.json") points to ~/.ftp_auth/auth.json

License

MIT licensed.