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

abandon-deploy

v1.2.0

Published

abandon deploy

Downloads

29

Readme

nodejs 部署项目

  1. 从 执行参数 读取 属性
  2. 从 配置文件 读取 属性
  3. 缺少的 属性 提示输入
  4. 压缩 编译目录 => tgz
  5. 连接到 服务器
  6. (如果备份目录不存在则创建 mkdir -p [backupPath])
  7. 上传 tgz 到 服务器 指定备份目录
  8. (如果部署目录不存在则创建 mkdir -p [deployPath])
  9. 在 服务器 解压tgz 到 指定部署目录

安装

npm install -g @eyunmy/deploy

用法

deploy --version
deploy --help
# 注: 需要在项目根目录, 编译目录按照当前目录查找, 压缩文件会创建在当前目录.
deploy

可传参数说明

<env> 用于 读取配置文件

  1. 配置文件 config(有该选项时, 则不会加载其他.env). 默认 .env .env.local .env.<env> .env.<env>.local
  2. 编译目录 buildPath. 默认 dist
  3. 服务器 用户名 serverUsername. 默认 admin
  4. 服务器 主机 serverHost
  5. 服务器(缩写 用户名@主机) serverUsername@serverHost
  6. 服务器 密码 password
  7. 备份目录 backupPath. 默认 ~
  8. 部署目录 deployPath. 默认 /var/www/html
  9. 部署命令 deployCommand. (不建议使用)
  10. 部署包文件名 packageName. (不建议使用)

参考配置文件

其中 serverUsername, serverHost 优先级比 server

BUILD_PATH='dist'
serverUsername='admin'
serverHost='SERVER_HOST'
SERVER='admin@SERVER_HOST'
PASSWORD='YOUR_SERVER_PASSWORD'
BACKUP_PATH='~'
DEPLOY_PATH='/var/www/html'

配置文件读取规则

例如 编译目录 buildPath 字段, 以下几种写法都ok, 优先级从上往下, 优先读上面的.

buildPath='dist'
BUILDPATH='dist'
buildpath='dist'
build_Path='dist'
BUILD_PATH='dist'
build_path='dist'