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 🙏

© 2025 – Pkg Stats / Ryan Hefner

web-core-components

v1.0.22

Published

Readme

web公共组件、方法库

新增组件流程

  1. 新建分支。

  2. 在components文件夹下新增文件夹(命名为要新增的组件名即可),在新增的文件夹中创建index.tsx(组件实现)、README.md(组件使用示例)文件,如需添加样式则创建index.less文件(样式文件引入方式,查看components/lessDemo)。

    如果组件依赖ProComponents、antd中的组件或dva,无需将依赖添加到dependencies中,只需要添加到devDependencies用于在example/app.tsx测试,因为现有项目都依赖这些,如果使用了现有项目中不存在的组件则将依赖添加到现有项目中,避免重复依赖,版本冲突导致问题。

  3. 组件在components文件夹下新增完成后,可以在example/app.tsx文件中测试验证组件的功能是否正常。(在example/app.tsx中按照现有逻辑添加完组件后,执行yarn start命令启动本地服务查看)

  4. 确定组件功能正常后,commit代码,然后修改package.json中的版本号,在CHANGELOG.md中添加本次更新说明,commit,执行yarn build,打包完成后commitpush代码,合并到develop分支。

  5. develop分支确认package.json中,publishConfig.registry = http://192.168.3.35:8081/artifactory/api/npm/xs-npm-dev-local/后(可手动更改,不提交即可),执行yarn publish推送到测试库,先使用测试库的代码测试,确认没问题后,再推送到正式库。

  6. 推送到正式库。切换到master分支,合并新建的分支,确认package.json中,publishConfig.registry = http://192.168.3.35:8081/artifactory/api/npm/xs-npm-local/后(可手动更改,不提交即可),执行yarn publish推送到正式库, 添加Tag。

修复组件流程

  1. 新建分支。

  2. 组件修复后,在example/app.tsx文件中测试验证组件的功能是否正常。

  3. 之后按照新增组件流程的4、5、6步执行。

新增公共方法流程

  1. 新建分支。

  2. 按照components/utils/index.ts文件内的方法定义格式及导出方法添加。

  3. 之后按照新增组件流程的4、5、6步执行。

公共组件及方法使用示例

  import { ImageUpload } from '@web-artifactory/web-core-components';
  import { getValueFromEventImg, processImgForm } from '@web-artifactory/web-core-components/utils';

版本更新规范

当前版本号

第一位表示大版本 第二位表示小版本 第三位表示 hotfix 版本

修复 bug 为 hotfix 版本; 新增功能但向下兼容为 小版本; 新增功能不能向下兼容为 大版本;