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

cap-ui

v2.10.3

Published

A Component Library for Vue.js.

Downloads

4

Readme

Capsule(胶囊),简称Cap,是一款基于饿了么 饿了么版本2.10.1开发的PC UI组件库。

项目文件结构

build 放置webpack的配置文件

lib打包生成文件

examples 放说明文档页面的文件 (修改文档或编写新组件的文档都在这里)

packages 放置ui组件

packages/src/theme-chalk 所有css样式放置在这个目录下,其中common/var.scss 为css变量文件

src/index.js组件注册的入口文件 ,配置webpack自动生成的,若需要修改请修改模板 /Users/yupeiying/Desktop/element/build/bin/entry-template.js

src/directives放置自定义指令

src/locale放置语言的配置文件

src/mixins放置组件用的混合文件

src/transitions放置动画配置文件

src/utils放置用到工具函数文件

test 测试文件

types typeScript文件

快速开发新组件

  • step1: npm run new newComponentName 自动生成开发组件所需的文件,找到相应文件编写代码即可

例如npm run new testComp 会生成以下文件:

  1. examples/doc/ 下生成4个testComp.md文件

  2. packages下生成testComp文件夹

  3. packages/src/theme-chalk/src 下生成 testComp.scss 文件

  4. test 和 types 下也会生成相应的文件

  • step2: npm run dist 打包所有的组件到lib文件夹下

安装Install

npm install cap-ui -S

使用Quick Start

import Vue from 'vue'
import Element from 'cap-ui'

Vue.use(Element)

// or
import {
  Select,
  Button
  // ...
} from 'cap-ui'

Vue.component(Select.name, Select)
Vue.component(Button.name, Button)