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

deployme

v0.2.6

Published

An automated tool to deploy untracked files to servers (such as images) through the use of SFTP

Downloads

21

Readme

deployme

An automated tool to deploy untracked files to servers (such as images) through the use of SFTP.

Installation

npm

The Node-package-manager (npm) is the recommended way to install deployme. To install via npm, run npm install deployme -g. The -g parameter specifies that the package should be installed globally, which is recommended for nearly every use case.

In addition, there are a few other varieties to installing via npm:

# install through this GitHub repository
npm install panchr/deployme -g

# Install directly through GitHub
npm install https://github.com/panchr/node-deployme.git -g

git

To install via git, run these commands in your terminal of choice:

git clone https://github.com/panchr/node-deployme.git
cd node-deployme

Now, you can directly access the CLI (Command Line Interface) by using ./bin/cli. Again, I highly recommend using npm instead.


Configuration

The CLI tool uses the default configuration file, .deploy-config. To generate a standard configuration file, run deployme init. This will generate the configuration file in the current directory.

Note: deployme will search for a .deploy-config file in any of the parent directories of the current working directory. So, it is possible to run the tool in any subdirectory of a project.

The configuration options are stored as standard JSON.

|name|description|type|default value| |----|-----------|----|-------------| |host|The host name of the server|String|"localhost" |port|Port to connect to the server with|int|22 |username|The username to connect with|String|"root" |password|The password of the above user|String|"" |local|An object of local configuration|Object|{} |local.root|The local root of the files to sync|String|"." |local.directories|The local directories to sync|Array|[] |local.files|The local files to sync (not supported yet)|Array|[] |remote|An object of remote configuration|Object|{} |remote.root|The remote root to sync to|String|"/"

For example, here is a sample configuration file:

{
	"host": "myserver.io",
	"port": 22,
	"username": "panchr",
	"password": "v3rys3cure",
	"local": {
		"root": "static",
		"directories": ["images", "icons"],
		"files": ["myfavicon.ico", "secure.js"]
	},
	"remote": {
		"root": "/var/www/site"
	}
}

Usage

deployme comes with a few useful commands:

init

This is the initialization script. To use it, run deployme init. It will walk you through the setup of the main configuration file, .deploy-config.

reset

Reset is very similar to init. In fact, it provides the same functionality but allows you to override previous options. It is invoked via deployme reset.

help

To get a list of commands and what they do, use deployme help.

diff

To see what the files that need to be synced, run deployme diff.

sync

Finally, deployme sync will calculate the required changes to be synced and then upload the appropriate files to the remote server.

local

deployme local provides a series of subcommands that allows you to configure the local settings of the syncer:

|Subcommand|Argument|Description|Example| |----------------|------------|-------------|----------| |root|path|Set the local root path to the file path|deployme local root /static| |add|path|Add a local path to be synced|deployme local add /test| |add|glob pattern|Add matching local paths to be synced|deployme local add *.css| |remove|path|Remove a local path from being synced|deployme local remove mystyle.css| |remove|glob pattern|Remove matching local paths from being synced|deployme local remove test/*|

remote

deployme remote only provides one command so far, but more will be added soon. Each subcommand allows you to configure the remote settings of the syncer:

|Subcommand|Argument|Description|Example| |----------------|------------|-------------|----------| |root|filepath|Set the remote root path to "filepath"|deployme remote root /var/www/static|