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

quick-deploy-cli

v1.1.0

Published

前端快速部署脚手架

Downloads

2

Readme

deploy-cli-service

前端快速部署脚手架服务,支持开发、测试、生产多环境配置

github

https://github.com/lovecallme/quick-deploy-cli

npm

https://www.npmjs.com/package/quick-deploy-cli

1 安装

全局安装 quick-deploy-cli(推荐使用)

npm install quick-deploy-cli -g

本地安装 deploy-cli-service

npm install quick-deploy-cli -D

注:本地安装的需要在调用命令前加 npx

2 使用(以下示例都采用全局安装方式)

2.1 查看版本

quick-deploy -v

2.2 查看帮助

quick-deploy -h

2.3 命令生成配置文件(在项目目录下)

quick-deploy init # 或者使用简写 quick-deploy i

2.4 手动创建或修改配置文件

在项目根目录下手动创建 quick-deploy.js 文件,复制以下代码按情况修改即可。

module.exports = {
  projectName: 'vue_samples', // 项目名称
  privateKey: 'C:/Users/86155/.ssh/id_rsa', //私钥地址
  // 部署环境可以指定多个
  prod: {
    name: '开发环境', // 环境名称
    script: 'npm run build', // 打包命令
    host: '192.168.132.32', // 服务器地址
    username: 'root', // 服务器登录用户名
    distPath: 'dist', // 本地打包生成目录
    webDir: '/www/dist', // 服务器部署路径
    bakDir: '/backup', // 备份路径 生产环境需指定,其他环境无需指定 (打包前备份之前部署目录 最终备份路径为 /backup/last-dist/dist.zip)
  },
  dev: {
    name: '开发环境', // 环境名称
    script: 'npm run build', // 打包命令
    host: '192.168.132.32', // 服务器地址
    username: 'root', // 服务器登录用户名
    distPath: 'dist', // 本地打包生成目录
    webDir: '/www/dist', // 服务器部署路径
    bakDir: '', // 备份路径 无需填写
  }
}

2.5 部署 (在项目目录下)

注意:命令后面需要加 --mode 环境对象 (如:--mode dev

quick-deploy deploy --mode dev # 或者使用 quick-deploy d --mode dev

生产环境需要输入 Y 确认,确认后开始部署,其他环境直接部署

2.6 回滚 (在项目目录下)

quick-deploy back # 或者使用 quick-deploy -b

回滚只支持生产环境,回滚需要输入 Y 确认,确认后开始回滚

2.7 注意事项

  1. 生产环境必须使用 pord ,其他环境随意

如配置 test:{...} 部署时需要使用命令如下(配置其他环境模仿如下命令即可):

quick-deploy deploy --mode test # 或者使用简写
  1. 生产环境必须配置备份地址,否则无法备份以及回滚

  2. 回滚只支持回滚一次无法多次回滚