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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@missthee/simple-deploy

v1.1.0

Published

Simple tool for processing scripts and uploading files

Readme

simple-deploy

simple-deploy

A simple NodeJS tool for packaging, copying to linux server, and cleaning up

Install

npm i @missthee/simple-deploy -D

Use

  1. Initialization

    # Initialize the configuration file.
    simple-deploy init

    or

    # chinese
    simple-deploy init -l zh-CN

    Generate configuration file simple-deploy.config.json after option.

  2. Deployment

    # Packaging, Copying to linux server, Cleaning up
    simple-deploy -e [environmentKey]

    Execution log example

         √ Check Configuration T:\deployFileTest\simple-deploy.config.json
         ? Confirm
         · deploy-cli
         · dev: 11.22.33.44
         sure to deploy dev ? Yes
         i Current Environment dev
         √ Build Code echo
         √ Create Local Tmp Dir T:\deployFileTest\.deployTmp_1611289911528\
         √ Zip Local File T:\deployFileTest\dist to T:\deployFileTest\.deployTmp_1611289911528\dist_deploy.zip
         √ Zip Local File T:\deployFileTest\dist1\index.html to T:\deployFileTest\.deployTmp_1611289911528\index.html_deploy.zip
         √ SSH Connect 11.22.33.44
         √ Upload File T:\deployFileTest\.deployTmp_1611289911528\dist_deploy.zip to \www\wwwroot\default\aaa\dist_deploy.zip
         √ Upload File T:\deployFileTest\.deployTmp_1611289911528\index.html_deploy.zip to \www\wwwroot\default\bbb\index.html_deploy.zip
         √ Unzip And Delete Remote File \www\wwwroot\default\aaa\dist_deploy.zip
         √ Unzip And Delete Remote File \www\wwwroot\default\bbb\index.html_deploy.zip
         √ Rename Remote File \www\wwwroot\default\bbb\index.html to \www\wwwroot\default\bbb\ondex.html
         √ SSH Disconnect
         √ Clean Local Tmp Dir T:\deployFileTest\.deployTmp_1611289911528
         ALL DONE

    Deployment process

    • Check Configuration Check file attributes and content
    • Build Code Execute the set instructions
    • Create Local Tmp Create a temporary folder to store the zip file
    • Zip Local File Archive local files
    • SSH Connect Establish ssh link
    • Upload File Upload archived files
    • Unzip And Delete Remote File Unzip and delete the uploaded archived file
    • Rename Remote File If it is a single file, and the uploaded file name is specified in the fileMap, the file will be renamed
    • SSH Disconnect Disconnect ssh link
    • Clean Local Tmp Dir Clean up temporary folder

Configuration File

  • simple-deploy.config.json example:
       {
         "local": {
           "projectName": "deploy-cli",
           "sshPrivateKeyPath": "~/.ssh/id_rsa",
           "sshPassphrase": ""
         },
         "env": {
           "dev": {
             "project": {
               "projectBuildScript": "npm build"
             },
             "server": {
               "serverHost": "11.22.33.44",
               "serverPort": 22,
               "serverUsername": "root",
               "serverPassword": "root"
             },
             "fileMap": {
               "dist": "/www/wwwroot/default/aaa",
               "dist1/index.html": "/www/wwwroot/default/bbb/rename.html"
             },
             "other": {
               "needRebuildWhenBuildScriptSameWithPreviousEnv": false,
               "isClearLocalDistFileBeforeBuild": false,
               "isClearServerPathBeforeDeploy": false,
               "isClearLocalDistFileAfterDeploy": false
             }
           },
           "prod": {
             "project": {
               "projectBuildScript": "npm build"
             },
             "server": {
               "serverHost": "55.66.77.88",
               "serverPort": 22,
               "serverUsername": "root",
               "serverPassword": "root"
             },
             "fileMap": {
               "dist": "/www/wwwroot/default/aaa",
               "dist1/index.html": "/www/wwwroot/default/bbb/rename.html"
             },
             "other": {
               "needRebuildWhenBuildScriptSameWithPreviousEnv": false,
               "isClearLocalDistFileBeforeBuild": false,
               "isClearServerPathBeforeDeploy": false,
               "isClearLocalDistFileAfterDeploy": false
             }
           }
         }
       }
  • other option
    • needRebuildWhenHasSameBuildScriptWithPreviousEnv if buildScript in current env was same as previous env:false skip build; true run build script.
    • isClearLocalDistFileBeforeBuild Use the key of fileMap, and use the project root directory as the starting path to clean up files before build.
    • isClearServerPathBeforeDeploy Use the value of fileMap, and use the project root directory as the starting path to clean up files before deployment.
    • isClearLocalDistFileAfterDeploy Use the key of fileMap, and use the project root directory as the starting path to clean up files after deployment.

NOTE

Only for linux server with unzip,rm,mv command