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

@hd-fe/ui

v0.1.27

Published

前端UI组件库

Downloads

10

Readme

前端组件库

项目安装

npm install

编译和热启动开发环境

npm run serve

编译和压缩生产环境

npm run build

检查和修正代码格式

npm run lint

使用rollup构建库文件(默认,更小巧)

npm run lib

构建库文件并发布到npm

先执行lib命令,注意保证当前环境使用的是npm官方仓库源地址 https://registry.npmjs.org/

npm run pub

目录介绍

| build
--| config.js  # 构建配置
--| rollup.config.js  # 构建脚本
| examples  # 文档和示例
--| assets
--| components  # 示例中用到的组件
--| docs  # 文档目录
--|--| base # 基础组件文档
--| filters
--| md-loader # 实现markdown文件中的示例运行的脚本
--| router
--| views # 示例页面
--| App.vue
--| main.js
--| theme.json  # 图表库使用的主题配置文件
--| util.js
| images
| lib
| packages  # 基础组件目录
--| index.js  # 组件构建配置
| public
| styles

组件添加

1. 在 packages 目录下添加组件文件

  • 组件结构、目录和文件命名严格参考以下要求,其他资源放到src目录下
| `<组件名>`
--| src # 组件的vue文件和其他相关资源目录
--|--| Main.vue # 组件的vue入口文件
--| index.js  # 组件入口文件,建议完全复制不作修改

Main.vue文件中 name 值为组件标签名,统一以 hd- 开头

export default {
  name: 'hd-block'
}

2. 在 build/config.js 中添加构建配置

  {
    name: 'hd-empty', # 仅作为构建文件名,与组件标签无关,但建议保持一致
    input: 'packages/empty/index.js',  // 构建输入文件
    output: 'lib/hd-empty.js' // 构建输出文件
  }

文档添加

1. 在 examples/docs/base 目录下添加组件文档文件

2. 在 examples/router/router.js 中添加构建配置

  {
    name: 'block',  # 文件名
    label: 'Block 块' # 左侧菜单显示的文字内容
  }

其中 namedocsmarkdown 文件名必须完全一致