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

@jdp-cli/cli

v8.2.0

Published

Readme

@jdp-cli/cli

安装

mac安装

npm i -g @jdp-cli/cli 

此工具只能使用京东jnpm安装和使用,推荐使用《nrm》切换下载源

sudo npm install -g nrm

nrm add jnpm http://registry.m.jd.com

nrm ls

nrm use jnpm

  npm -------- https://registry.npmjs.org/
  yarn ------- https://registry.yarnpkg.com/
  cnpm ------- http://r.cnpmjs.org/
  taobao ----- https://registry.npm.taobao.org/
  nj --------- https://registry.nodejitsu.com/
  npmMirror -- https://skimdb.npmjs.com/registry/
  edunpm ----- http://registry.enpmjs.org/
* jnpm ------- http://registry.m.jd.com/

windows安装

npm i -g @jdp-cli/cli 

命令简介

Usage: jdp <command> [options]

Options:
  -v,--version              jdp版本号
  -l, --localhost           是否指定本地调试文件路径 (default: false)
  -t, --test                启用测试功能 (default: false)
  -o, --offLine             走本地缓存包,离线开发,但是如果没有包会出现各种不可预知bug (default: false)
  -h, --help                display help for command

Commands:
  init|i                    初始化一个项目
  login|l                   erp登录主要为了配合发布使用
  deploy|d                  把代码按照部署规则提交到git仓库,触发自动部署的功能
  cleanCache|cc             清理缓存路径下的包
  generator|g [options]     通过配置读取楼层配置生成容器代码
  pack|p [options] <env>    对项目进行打包操作
  server|s [options] [env]  开启本地服务 现在只支持dev环境
  help [command]            display help for command

初始化项目模块

jdp init 

选项-支持4中模板创建

单楼层开发模板 - 此模板主要用于单楼层开发模板-服务于slime整合平台
联合楼层模板 - 此模板主要用于发布到ihub和楼层模板-服务于slime和通天塔整合平台,可以作为通天塔的整合开发模版单独使用
整合楼层模板 - 此模板主要用于slime平台整合单楼层模板
SRM模板- 此模板主要用于省钱卡和PLUS业务(采用srm部署)
SRM-VITE模板 - 此模板主要用于整页面开发模板

开启服务模块

启动服务功能,同时启动mock服务

jdp server 
或者  
jdp s 

现有功能只支持 dev 服务,后期拓展别的功能。

打包模块

jdp  pack dev				打开发环境包
jdp  pack beta				打测试包
jdp  pack  pretest			打预发环境包
jdp  pack  performance		打性能检测包
jdp  pack production		打线上环境报

或者
jdp  p dev				打开发环境包
jdp  p beta				打测试包
jdp  p  pretest			打预发环境包
jdp  p  performance		打性能检测包
jdp  p production		打线上环境报

部署模块

现有版本 支持《整合楼层模板 》《PLUS模板》《SRM模版》 《VITE模版》

需要 jdp.config.js git 部分配置对应关系 还需要 在Git Hooks 和流水线配置相关配置项

jdp deploy
或者
jdp d 

选项 ( 正常开发顺序是 beta -> pretest -> production )

beta - 部署预发环境(打预发包,相当于我们在预发环境开发,上线前有大量的bug还需要修改)
pretest - 部署预上线环境(打线上包,此功能主要是打包线上包发布到预发)
production - 直接部署上线(把pretest的最后版本合并到master触发上线审批流程)

整合楼层模板-配置化楼层代码生成功能

通过jdp.mix.config.js配置配合楼层贡献生成页面代码

jdp generator
或者
jdp g

《单楼层开发模板》《联合楼层模板》发布功能

jdp publish
或者
jdp pb

登录功能

通过唤起浏览器登录京东erp账号,作为发布代码使用

jdp login 
或者
jdp l

提交代码功能

把代码提交到git仓库,主要是对git方法进行了便捷封装,按照要求提交

jdp push
或者
jdp pu

包缓存清理

清理缓存包功能

jdp cleanCache 
或者
jdp cc

选项


删除模板包缓存 - 删除各种模板包的缓存,主要在升级模板开发包以后使用
删除楼层物料库缓存- 删除楼层物料库缓存包,主要删除配置化的楼层包缓存
删除核心包缓存- 删除jdp-cli功能能包缓存,例如 pack server deploy
删除jdp-cli所有缓存包   删除jdp-cli所有缓存包 - 删除jdp-cli模板包、物料库、核心功能缓存包

包大小分析功能

主要对打包以后的包大小进行分析

jdp   analyze dev				打开发环境包
jdp   analyze beta				打测试包
jdp   analyze  pretest			打预发环境包
jdp   analyze  performance		打性能检测包
jdp   analyze production		打线上环境报

或者
jdp  a dev				打开发环境包
jdp  a beta				打测试包
jdp  a  pretest			打预发环境包
jdp  a  performance		打性能检测包
jdp  a production		打线上环境报