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

@mcfly001/vue-ui

v0.0.7

Published

This is a UI repository based by vue.

Downloads

4

Readme

vue-ui

基于vue的一个ui组件库

开发指南

步骤
  • 在package目录下面新增你要开发的组件,例如cell-swipe
  • 在src/index.js中引入组件、注册并且导出
import CellSwipe from '../packages/cell-swipe'

const install = function(Vue, options = {}){
  Vue.component(CellSwipe.name, CellSwipe)
}

// 自动安装
if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

module.exports = {
  install,
  CellSwipe
}
  • 执行打包
// 第一种方式,将组件打入dist/index.js中,将packages中的cell-swipe打包,并在lib下面生成对应的js和css文件
npm run sigle cell-swipe

//第二种方式,将组件打入dist/index.js中,将packages中的所有组件都打包,并在lib下面生成对应的js和css文件
npm run build
  • 编写example,在examples/router中添加路由,在examples/views新建cell-swipe.vue文件,在common/nav.js中添加路由
// 在example/router 中添加路由
import CellSwipe from '../views/cell-swipe.vue'
const routesArr = [
  CellSwipe
]

//在common/nav.js中的paths对象中添加路由
let paths = [
  {
    name: 'cell-swipe',
    path: '/cell-swipe'
  }
]
  • 编写文档,在doc/views/content 中新增cell-swipe.md文件,并且在doc/router中引入组件
import CellSwipe from '../views/content/cellSwipe.md'
const routesArr = [
  CellSwipe
]

命令行解析

// 执行单元测试,打开test/unit/coverage/Icov-report/index.html,会看到测试结果
npm run test

// example, 会在浏览器中热加载组件
npm run dev

// 文档dev, 在浏览器中生成文档的热加载内容,文档右侧的example需要先执行npm run doc
npm run docdev

// 打包文档
npm run docbuild

// 单个组件打包,将所有组件打包到dist/index.js和dist/index.css中, 并且将该组件单独打包到lib下
npm run sigle <component-name>

// 所有组件打包, 将所有组件打包到dist/index.js和dist/index.css中, 并且将所有组件都单独打包,并在lib下生成对应的文件
npm run build

// 将组件上传到私库,上传的文件在package.json中定义,目前上传的文件为dist lib packages package.json README.md
npm run prepublishOnly