npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sftploy

v0.0.3

Published

A simple (CLI) tool to deploy stuff via SFTP

Downloads

733

Readme

SFTPloy

A simple (CLI) tool to deploy stuff via SFTP

Build Status Dependency Status Dependency Status

(Check out ftploy for FTP deployments.)

Usage

npm install --save-dev sftploy
var sftploy = require('sftploy');

sftploy({
  username: 'john',
  password: 'abc123',
  privateKey: './id_rsa'
  host: 'example.com',
  port: 22,
  localRoot: './build',
  remoteRoot: '/www/example.com/'
  exclude: [
    '.git'
  ]
}).then(function () {
  console.log('Deployment successful.');
}).catch(function (error) {
  console.error('Deployment failed.', error);
});

CLI

npm install -g sftploy
$ sftploy

The following options may be stored within a sftploy.json file in the root of your project or passed as parameters or environment variables (prefixed using sftploy_). For example, your username and password may be provided in the following three ways.

sftploy.json file

{
  "username": "john",
  "password": "abc123"
}

Parameters

$ sftploy --username="john" --password="abc123"

Environment variables

$ SFTPLOY_USERNAME="john" SFTPLOY_PASSWORD="abc123" sftploy

Options

username

The SFTP username.

password

The SFTP password. In case no password is provided, the CLI will prompt you for it.

privateKey

The SSH private key.

host

The SFTP host.

port

The SFTP port.

Default: 22

files

An array of files or a glob pattern to select files to upload.

Default: **/* (= glob pattern for all files and directories within the provided localRoot; see below)

localRoot

The local directory whose contents SFTPloy will upload.

Default: process.cwd() (= the directory you’re running the CLI in)

remoteRoot

The remote directory where SFTPloy will upload the contents to.

Default: /

exclude

Certain files (matching the respective glob patterns) that shall be ignored by SFTPloy. In most cases, you may want to exclude your .git directory or directories like node_modules.

If you’re using an array of files instead of an glob pattern within the files option, exclude will be ignored.

Examples

$ sftploy --exclude=*.jpg --exclude=*.png --exclude=node_modules/**/*
{
  "exclude": [
    "*.jpg",
    "*.png"
  ]
}

Changelog

  • 0.0.3
    • Include dot files during deployments
  • 0.0.2
    • Add shebang
    • Update dependencies
  • 0.0.1
    • Initial version

License

Copyright (c) 2016 Thomas Rasshofer
Licensed under the MIT license.

See LICENSE for more info.

Contributors