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

deploydo

v2.1.1

Published

Deploy your app to ftp or sftp with a single command

Downloads

3

Readme

deploydo

Deploydo was created because we have a lot of projects which are simply deployed by uploading files via ftp / sftp. This process is now automated by using deploydo.

Version 2

Breaking changes

  • config files are json files and no js files anymore.
  • password is not saved in standart config file anymore. You can now commit the config file (if it's okay for you). The password is saved in a separated file, which should not be commited.

installation

npm install -g deploydo

warning add deploy.conf.json to your .gitignore if you don't want to commit your deployment data !

configuration

Create deploy.conf.json file in your project directory. Use this as template:

{
  "default": {
    "host": "yourhost.com",
    "port": "22",
    "user": "username",
    "remotePath": "/public_html",
    "sourcePath": "/dist",
    "ignore": ["**/*.zip", "**/*.txt"],
    "type": "sftp",
    "verbose": true,
    "useCache": true,
    "buildCommand": "npm run build"
  },
  "production": {
    "host": "yourhost.com",
    "port": "21",
    "user": "username",
    "remotePath": "/public_html",
    "sourcePath": "/dist",
    "ignore": "**/*.png",
    "type": "ftp",
    "verbose": false,
    "useCache": true,
    "buildCommand": null
  }
}

To create a config sample file inside your current directory:

$ deploydo --sample

Example commands

Start deployment for production config

$ deploydo --env=production

Start deployment for default config

$ deploydo

If you want to use another config file use

$ deploydo --deployConfigFile=configFilename.json

Config options

host: hostname or ip the script should connect to.

port: 21 for ftp 22 for sftp. Might depend on your server setting.

user: ftp/sftp username.

remotePath: path on your server. When you connect through sftp, you might be in the root folder, even if your ftp client sends you to another one when connecting.

sourcePath: path relative to your working directory.

ignore: Glob pattern or an Array of glob patterns. Which files you want not to be uploaded. Check https://globster.xyz/ for examples.

| glob pattern | Means
| ------------- |:-------------:| | /myapp/config/* | All files inside config directory | | **/*.png | All .png files in all directories | | **/*.{png,ico,md} | All .png, .ico or .md files in all directories | | /myapp/src/**/*.ts | All .ts files inside src directory (and all its subdirectories) |

type: ftp or sftp. sftp is basically ftp over ssh.

verbose: If true, list files in console during upload.

useCache: If true, cache system is used. A deploy.cache.json is uploaded in destination folder, which has hash values of the uploaded files. Next deployment this file is downloaded and checked against the local files. Only changed or new files will then be uploaded.

buildCommand: If you want to execute a build command before uploading, you can type it here. For example npm run build

Passwords

You will be asked to enter your password. You can then save it automatically in a separated password file. The password is not encrypted when saved. After that you will be asked if the script should add this file to your .gitignore (what you should do).

Only use this option when this is no problem for you.