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 🙏

© 2026 – Pkg Stats / Ryan Hefner

typhon-clitools

v0.0.17

Published

this is a tool for plateform external component

Readme

this is a tool for 敏捷BI build external component 详细文档

整体流程

process

使用步骤

0 下载工具(require)

// 全局安装cli工具
npm install -g ty-clitools

// 安装ty-clitoos后,就可以在任何目录使用ty命令
ty

Usage: ty-clitool [command] [options]

Options:
  -V, --version              output the version number
  -h, --help                 output usage information

Commands:
  init [options] <app-name>  Generate a template for project
  generate                   Generate componets json
  sync [options]             Updata componnet Info to platform
  serve [entry]              server a .js file in production mode with zero config
  build [entry]              build a .js file in production mode with zero config

1 初始化项目(require)

// 生成项目文件夹自动下载依赖
ty init project-test2

? name:(project-test2) 
? description: (This is a component)
downloading template
installing dependens

2 本地开发(rquire)

// 开启本地服务进行本地调试开发
ty serve

ty-server

具体的可以参见组件开发及调试

3 选择私有npm源(option)

// 私有npm源能使用的前提是你当前


// registry的具体url随着不同环境而不同
npm config set registry http://domain:7001/

// 初次使用:登录私有npm源
npm login
username: admin
password: admin
e-mail: [email protected]

// 将包名的改为带有特殊scope的名字如:@cnpm
 "name": "@cnpm/project-test2",

4 打包组件

上传组件之前,需要将组件打包,在组件包根目录执行命令:

gvp build

打包成功后会在根目录下生成dist文件夹。此步骤为必须,必须要build之后才能upload,在项目中应用时会从dist中拉取打包好的代码

5 上传项目(require)

下面有两种上传项目到平台的方式,两种都支持。


(1) 快速上传项目
// 待项目开发完毕后上传最新版本报到npm以及可视化平台
// 注意初次使用需要登录npm
npm run upload

(2)分步骤上传项目
// 上传组件到npm
npm publish
// 生成当前组件信息
ty generate
// 将当前组件信息同步到默认平台(这里需要注意的可以通过设置 host 选项来选择平台,这里host与对应的敏捷BI域名相同)
ty sync --host=http://${host}/api

6 在npm查看包(option)

这里分两种情况:

  • (1)没有设置私有npm源的直接上 npm根据包名搜索
  • (2)第三步中设置了npm源的,上私有源(根据不同环境地址不一样,按照第三部情况这里为http://http://domain:7002)根据包名搜索
    ty-cnpm

7 组件使用

详细参见组件使用