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

mandy

v0.1.8

Published

📦 前端自动化部署工具

Downloads

30

Readme

Mandy

📦 前端自动化部署工具

本项目为实验项目,不建议正式环境使用。部署前端项目建议结合 CI/CD 来做自动化。

mandy-demo

功能

  • 可视化的部署流程
  • 可交互的回滚流程
  • 多个前端环境管理
  • 无缝切换部署回滚

安装

# 全局安装
yarn global add mandy

# 本地安装
yarn add mandy --dev

其他安装

git clone 
npm link

使用

命令格式

mandy <command> <environment>

命令列表

  • mandy deploy // 部署
  • mandy rollback // 回滚
  • mandy current // 当前版本信息
  • ···

开始部署

Step 0: 生成配置文件

进入你的项目,运行 mandy generate命令,创建配置文件

执行后,将在当前目录建立 mandy/production.js 配置文件

mandy generate production

Step 1: 编辑配置文件

建议将配置文件添加到 .gitignore,避免泄漏 ssh 信息

// mandy/production.js
module.exports = {
  ssh: {
    host: 'github.com',
    username: 'root',
    password: 'password',
    // privateKey: '/Users/zzetao/.ssh/id_rsa'
    // 更多配置:https://github.com/mscdex/ssh2#client-methods
  },
  keepReleases: 10    // 保存历史版本数量
  workspace: 'build', // {相对路径}  本地待发布文件目录
  deployTo: '/var/www/front_end/github.com', // {绝对路径}  线上部署目录
  verify: true // 是否需要输入验证码验证,默认 true
  tips: {
    deployInfo: '部署时提示信息',
    rollbackInfo: '回滚时提示信息'
  }
}

Setp 2: 开始部署

执行 mandy deploy 命令执行部署任务

mandy deploy production

enjoy ~

Todo

  • !! 重构 !!
  • ~~回滚版本~~
  • ~~查看当前版本信息~~
  • ~~任务驱动~~
  • ~~部署到多台机器~~
  • 更多自定义配置
  • 完善文档
  • 调整错误信息抛出

License

MIT © zzetao