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

bbw-components

v1.0.7

Published

1. 复制`src/components/Empty`文件夹 2. 修改.vue和.js中的文件名和组件名 3. 编写组件代码 4. 在build/entrys.ts中添加入口 5. 在src/components.ts中添加入口 6. 打包后的css在lib/assets目录下

Downloads

7

Readme

###添加UI组件-

  1. 复制src/components/Empty文件夹
  2. 修改.vue和.js中的文件名和组件名
  3. 编写组件代码
  4. 在build/entrys.ts中添加入口
  5. 在src/components.ts中添加入口
  6. 打包后的css在lib/assets目录下

###关于样式文件

  1. 组件和样式文件应该放在一起
  2. 组件内style标签应该使用module属性,开启css modules, 防止样式互相影响
  3. 全局样式,不开启css modules的样式,希望被覆写的样式,应该放在src/styles目录下,引入时不加module属性
  4. 使用Layout组件,自动引入src/index.scss
  5. 在其他项目中,可以直接使用 @import '~bbw-components/src/styles/*.scss'引用scss

###添加模块

  1. 编写代码
  2. 在src/index.ts中添加入口
  3. 如果需要打包整个公共模块,请自行修改src/index.ts文件

###关于副作用代码

  1. 形如 import "a.css";, 引入却没有使用,但确实修改了其他对象造成了副作用的,称为副作用代码;
  2. TreeShaking的时候副作用代码会被删除;
  3. 如果不想删除的,在package.json中的sideEffects字段加入白名单

###命令说明

  1. build: 打包所有
  2. bundle:server : 模块化打包(供服务器端使用)
  3. bundle:browser : 模块化打包(供浏览器端使用)
  4. bundle : bundle:server + bundle:browser
  5. bundle:lib : 按照UI入口打包(提取css用)
  6. declaration: 声明d.ts