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

moc-mocui

v1.1.4

Published

基于element二次封装组件库

Downloads

2

Readme

ease-element

基于element-ui组件库, 快速搭建中后台系统

npm包

地址

安装

1、定义命令别名"nenpm":

alias nenpm='cnpm --registry=http://rnpm.hz.netease.com/ --registryweb=http://npm.hz.netease.com/ --cache=$HOME/.nenpm/.cache --userconfig=$HOME/.nenpmrc'

2、安装

nenpm install @ehr/ease-element

按需引入

1、安装 babel-plugin-component:


yarn add  babel-plugin-component -D 

# or  npm i babel-plugin-component -D 

2、在.babelrc 加入

[
      'component',
      {
        libraryName: '@ehr/ease-element',
        style: false
      },
      '@ehr/ease-element'
    ]

# or 方便本地调试的配置

const isProduction = process.env.NODE_ENV === 'production' && process.env.VUE_APP_MODE === 'production'
[
      'component',
      {
        libraryName: '@ehr/ease-element',
        style: false
        libDir: isProduction ? 'lib' : 'src/packages'
      },
      '@ehr/ease-element'
]

# or npm run watch 

创建新组件

通过命令创建骨架


npm run new:components 组件名(小写+中划线连接,例 npm run new:components ease-text)

会在6个地方做初始化创建,允许命令行之后正常显示如下

------2、src/lib创建组件成功---------
------4、docs/.vuepress组件创建成功---------
------5、docs/views/components组件文档创建成功---------
------done~~快去完善组件吧~~----------------

组件文档


npm run docs:dev

目录

|-- ease-element
    |-- .babelrc                           // babel相关配置
    |-- .eslintrc                          // eslint相关配置
    |-- .gitignore
    |-- README.md                          // 项目说明文档
    |-- components.json                    // 组件配置文件
    |-- package.json
    |-- yarn.lock
    |-- build                              // 打包
    |   |-- bin
    |   |-- webpack                   
    |-- docs                               // 文档
    |-- src                                // 入口文件以及各种辅助文件
    |   |-- components                     // 组件源码
    |   |-- directive                      // 指令
    |   |-- mixins
    |   |-- style                          // 全局样式

指令介绍

  1. npm run docs:dev 组件文档开发环境
  2. npm run docs:build 组件文档打包
  3. npm run new:components 快速初始化组件骨架
  4. npm run lib 组件库打包
  5. npm run utils src/util 打包
  6. npm run watch 监听变化,方便本地调试
  7. npm run verbose 查看打包时具体报错信息

整体计划

组件

utils

脚手架