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

ynpm-tool

v5.7.8

Published

yonyou FED large front end technology department, an enterprise internal contracting tool.

Downloads

1,405

Readme

概述

ynpm是一款基于用友内部的镜像库,为用友内部打造一个优质的代码共享平台、业务组件的多样性、组件能力最大化的输出。把各种组件、工具的能力快速输出到各个项目中,提高项目的开发速度、节省项目成本、从而实现组件价值最大化、利益的最大化。

ynpm还提供组件的上传、下载的以及热门组件的统计。进行有针对性的进行组件优化和能力的持续集成。

ynpm 功能特性

  1. 根据用户网络进行自动匹配、自动切换、内网快速下载
  2. 镜像无需同步,下载即缓存,实现一次下载,全员共享
  3. 安全可靠,友互通域账号权限校验
  4. 内网发包配置简单、仅需登录即可
  5. 提供强大的cli工具、模块化的实现、快速融合其他cli工具
  6. 不对npm的镜像源入侵

基本原理

  1. 使用 Nexus Repository OSS 构建镜像
  2. 使用自己独立的数据存储、资源包做统计
  3. 使用koa+node做中间层做请求转发和校验机制
  4. react开发独立的官网站点

开始使用

安装

请确认你在本地全局安装了Node.js,然后使用npmynpm全局安装:

$ npm install ynpm-tool -g

下载 package

安装到dependencies依赖的包

$ ynpm install @yonyou/xxx --save

使用对外镜像下载已废弃(专属化或非内网环境可用、因护网行动暂不提供该镜像);

安装到devDependencies依赖的包

$ ynpm install xxx --save-dev

也可以直接使用简写:

$ ynpm i @yonyou/xxx -D

显示ynpm的帮助信息/版本号;

$ ynpm -h/v

ynpm发包

  1. 登录 ynpm
$ ynpm login
// 按照需要分别输入友互通账号、友互通密码、域账号和域账号密码

2, 执行ynpm publish

$ ynpm publish

Q&A常见问题

  1. 下载包极慢,报错timeout 根据反馈,少数包会报错。原因是安装包依赖一个外链下载(可能是github或amazon等第三方地址)。因为众所周知的原因,你很有可能下载不到从而出现timeout(相同的问题cnpm也会存在).

  2. 发包出现 401、403 的情况

执行ynpm login重新登录

  1. 官网提示‘该包上传时没有文档’

ynpm publish 根目录无文档 README文件名必须是 README.md

创建README.md, 重新 ynpm publish 或者 ynpm updateInfo

4.发包提示NO PERMISSION!

联系该包的管理员增加权限

如果您尝试多次,自己无法解决的问题请反馈给我们

基础命令

version

$ ynpm -v

或者

$ ynpm -version

help

$ ynpm -h

install

$ ynpm install

或者

$ ynpm i

update

$ ynpm update

高级命令

cdn:refresh

cdn刷新,url为刷新地址,type为File或Director,server为云服务商(oss,obs,cos)

 $ ynpm cdn:refresh -url=xxx -type=xxx -server=xxx

login

用于登录,根据提示填写登录信息。

$ ynpm login

set

用于修改ynpm的相关配置,信息将保存在.ynpmrc文件。

$ ynpm set usein=npm/pnpm

publish

用于私有镜像发包

$ ynpm publish

updateInfo

用于更新在ynpm官网显示的readme文件,执行方式类似publish

$ ynpm updateInfo

reinstall/rei

鉴于ynpm update的不稳定,reinstall可以选择重装全部包

$ ynpm rei

可以重新安装单个包

 $ ynpm rei @mdf/cube

也可以根据package的信息重新安装同组织下的所有依赖

 $ ynpm rei @mdf

特殊命令

download

用于下载tgz压缩文件

$ ynpm download [email protected]

del

删除node_modules下文件

$ ynpm del
or
$ ynpm del @mdf

ucf:build

前端引擎构建

ucf:deploy

前端引擎部署