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

pgy-deploy

v1.0.9

Published

使用ssh2与scp2实现代码发布

Downloads

27

Readme

设计理念

  • 简化打包后提交到服务的繁琐操作;
  • 前置与后置命令用于解决项目文件发布后需要执行部分命令而准备,以达到扩大应用范围;

环境

nodejs

安装

npm

npm i pgy-deploy -g

yarn

yarn global pgy-deploy

注:每次出现安装后需要重新配置环境配置文件路径

配置文件

  • 默认环境配置文件:default.json(UTF-8)
  • 注:配置文件默认设置在执行命令的当前目录下。配置文件名称和路径支持修改
{   
    "ceshi":{
       "serverNmae": "", // 服务器简称(对服务器进行重命名,方便管理,可任意定义)
        "loginWay":0, // 登陆方式 0:密码方式   1:证书方式
        "host": "", // 服务器ip
        "port": "", // 端口号
        "username": "", // 连接用户名
        "password": "", // 连接用户密码
        "privateKeyPath":"", // 证书地址
        "localPath": "路径", // 本地文件路径
        "serverPath": "路径", // 服务器文件路径
        "preCmd": "cd /www \n mkdir test", // 前置命令(字符串类型目录使用换行符 \n 分割)
        "rearCmd": [
            "cd /www",
            "mkdir test"
        ] // 后置命令 (多条命令可以用数组分割)
    },
    "ceshiProd":{
        // 支持参数与以上相同
    },
    "配置key支持自定义合法字符串":{
        // 支持参数与以上相同
    }
}

命令及相关配置

pgy-deploy -i [key]
pgy-deploy ?
pgy-deploy -d [name]
pgy-deploy -config

注:所有命令区分大小写

pgy-deploy -i [key]

项目发布命令 key:必填,此参数为每一组配置文件的key

例:

pgy-deploy -i ceshi

pgy-deploy -i ceshiProd

pgy-deploy ?

输出帮助文档

pgy-deploy -d [name]

修改(重置)默认环境配置文件路径及名称

name: 当此参数为空或不合法时,执行重置操作;此参数可设置为相对于运行命令的当前目录路径,也可以设置为绝对路径, 例:

pgy-deploy -d mydefalut.json

pgy-deploy -d ../mydefalut.json

pgy-deploy -d C:/Users/my/Desktop/mydefalut.json

pgy-deploy -config [key]

key:key为配置文件中的一组配置的键值 不传key时:打印当前设置的默认环境配置文件名称路径 当key存在时,打印对应组配置信息(可以用于测试配置是否正确)

pgy-deploy -v

查看当前包版本