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

@yc-micro-front/flow-deploy

v1.3.2

Published

自动化打包脚本 deploy for cli

Downloads

28

Readme

项目部署脚本

背景:微前端项目中存在多个项目在部署的时候需要单独打包并且手动上传到测试环境,每次都需要花费几分钟的时间进行上传,如果同时需要构建多个微前端项目,耗时现在整合项目的打包方式,通过手动执行命令调用SSH2上传到测试环境中,供各个项目使用。

安装及使用

如何安装?

项目中安装依赖

yarn add @yc-micro-front/cli -D
yarn add @yc-micro-front/flow-deploy -D

如何使用?

原本构建通过 yarn test121 方式,构建完毕之后手动上传到121环境中;现在只需要在package.json中配置script

"script": {
    "deploy": "npx yc flow deploy"
}

使用方法如下:

# 方法一(推荐)
yarn deploy

# 方法二
npx yc flow deploy

需要注意的是,第一次执行npx yc flow deploy会检测服务器配置信息,如果没有,将在当前项目下生成sshConfig.js配置文件,开发者需要手动配置服务器信息,之后再重新运行部署命令。

运行之后,工具会自动调用yarn test121进行构建项目,构建完毕之后进行上传操作

容错检测

运行deploy命令之后,工具将会要求开发者选择需要构建的项目,并且会以该项目名称作为ssh的上传路径,为了避免手误导致构建上传错误引发的不必要后果,工具将会检测当前选择的项目名与实际当前项目中package.json中的name进行模糊比较以确保构建正确,要求开发者不能随意更改package.jsonname,并且保证name中包含构建项目名称,如'risk-control-monitor'.includes('risk')