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

pmd-mobile-component

v0.1.343

Published

前端组件库

Downloads

121

Readme

目录结构

| - | -- build (各种配置文件) | | --- | ------------------------------- |docs (文档存放目录) | - | -- example (示例工程存放目录) | | --- | ------------------------------------- |module (模块相关存放目录)

  • ​ |-- tip-merhcant (游戏内H5功能模块)
  • ​ |-- tip-match (赛事功能模块) | - ​ | -- tip-act (活动常用功能模块) | | --- | ------------------------------------- |ui (前端组件相关存放目录)
  • ​ |-- sass (基础样式)
  • ​ |-- tip-merhcant (游戏内H5组件)
  • ​ |-- tip-match (赛事组件) | - ​ | -- tip-act (活动常用组件) | | --- | --------------------------------- |html (重构静态文件相关存放目录)
  • |-- tool (脚手架等工具文件)

运行说明

安装依赖

npm install

运行和构建示例工程

运行示例工程 npm run demo

构建示例工程 npm run build:demo

运行和构建文档

运行vuepress文档 npm run docs:dev

构建vuepress文档 npm run docs:build

配置文件

build/auto-regist.js 搜索ui下的组件,全局注册组件,这样示例工程中不用继续引入

build/tip-css-loader.js 处理vue文件的loader,用于处理vue需要加载的scss组件,通过替换@TIP_STYLE_NAME实现

build/webpack.base.js 基础webpack配置文件,其他webpack配置文件从这个配置继承

/build/webpack.demo.js 示例工程配置文件

如何添加一个业务UI组件

0. 新建组件目录

直接跑下面的命令就可以了

npm run compcli init <name>
// 例如 npm run compcli init tip-comp-dialog-input-addr

1. 开发组件

  1. ui目录下新建一个目录,开发组件代码
  2. npm run demo 运行示例工程
  3. 执行下面的流水线,将构建和发布示例工程 http://dev.oa.com/console/pipeline/tip-component/p-a6dbb686dccd40e4b682014c9f91e522/preview

2. 编写文档

  1. docs/ui新建一个同组件名称的MD文件,示例代码直接加上demo-block就可以显示

     <demo-block component-name="你的组件名" />
  2. npm run docs:dev 运行文档工程

  3. 执行下面的流水线,将构建和发布示例工程 http://dev.oa.com/console/pipeline/tip-component/p-d71f8a539fa84d01a26ad0b14be96d76/preview

注意!!!:组件目录、组件名称、MD文档名称需要是一样的,demo工程和文档中的示例将自动完成,不需要编写