zipavlin / ftpScout

Node.js file watching module that provides automatic ftp upload.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

ftpScout is a node.js file watching module that provides automatic ftp upload (using node-ftp module) and optional minification of .js and .css files using uglify-js and sqwish. It currently only supports ftp protocol.

It requires ftpScoutConfig.json file to work properly. You can use ftpScout's "init" method to start step by step dialog to create it.

This module is in alpha state. It should be stable, but you are strongly advised to backup any files before using it. You should do a manual backup, which is the safest. Optionally you can also use ''ftpScout backup'' method to create backup of all remote files on the watch list or use ''ftpScout watch --b'' to backup a remote file before it is being updated.

Requirements

Install

npm install ftpscout -g

Use

ftpScout watch [options]

Options

  • -safemode, --s - Checks that file also exists in a remote folder and is older than the one being uploaded.
  • -minify, --m - Minifys .css (using sqwish) and .js (using uglify-js) files. Keep in mind that remote file is overwriten with minified version!
  • -info, --i - Adds arbitrary information (author, contact, release date, description, link, license, etc.) from watcherConfig.json file.
  • -backup, --b - Creates a backup file before upload.

Methods

  • watch - Starts watching files.
  • add [file/files] - Adds new file(s) to watchlist.
  • remove [file/files] - Removes file(s) from watchlist.
  • init - Starts guided dialog to create and populate watcherConfig.json file.
  • list - Lists all files that are on the watchlist.
  • check - Check if files that are on the watchlist still exist.
  • backup - Creates backup of files that are on the watchlist (from remote folder).
  • help - Displays help.

About

Node.js file watching module that provides automatic ftp upload.

License:MIT License


Languages

Language:JavaScript 100.0%