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

vue-river-ui

v1.0.5

Published

A Component Library By River for Vue.js.

Downloads

4

Readme

webpack4.0-vue-components-config

基于webpack4.0的一套打包自定义vue组件的全自动脚手架配置

使用此webpack配置开发vue组件,你只需要运行创建组件命令,即可完成文件的生成,组件的配置,开发过程中可即时预览组件,开发完成后运行打包命令,会自动将新组件加入库文件

基本命令

|命令|说明| |----|----| |npm run dev|开发环境,可以边编写组件边预览| |npm run build|生产环境,打包组件库文件| |npm run new 英文名 中文名|用于新建组件 例如 npm run new test 测试| |npm run remove 英文名|用于删除组件以及配置文件 例如 npm run remove test, 强烈建议使用此命令删除组件|

说明

  1. 使用npm run new *** *** 创建组件

  2. 会生成以下文件

    • [组件名].md //用于组件示例以及文档编写

    • [组件名].js //组件的入口文件,用于挂载到Vue

    • main.vue //vue组件的源码

    • main.scss //vue组件的sass样式

  3. 会修改以下文件

    • nav.config.json // 开发环境下的路由配置

    • components.json // 组件的配置列表

  4. 使用npm run remove *** 会删除以及修改以上文件

使用方式

import Vue from 'vue'
import *** from '***'         //组件入口文件或者组件打包后的文件或者npm包名 

Vue.use(***);

目录结构

|-- project
    |-- .DS_Store
    |-- .gitignore
    |-- README.md
    |-- package.json
    |-- yarn.lock
    |-- build
    |   |-- utils.js                        //自定义工具函数
    |   |-- webpack.base.js                 //webpack公共配置
    |   |-- webpack.demo.js                 //webpack开发环境配置(继承dev)
    |   |-- webpack.dev.js                  //webpack开发环境配置
    |   |-- webpack.pro.js                  //webpack生产环境配置
    |   |-- bin
    |   |   |-- build-entry.js              //通过命令生成lib入口文件
    |   |   |-- build-route.js              //通过命令生成开发环境路由配置
    |   |   |-- new-component.js            //通过命令创建组件
    |   |   |-- remove-component.js         //通过命令删除组件
    |   |-- config
    |       |-- index.js                    //一些配置,可以在此配置组件命名空间
    |-- lib
    |   |-- main.6a393d5510c26353ac73.css   //组件打包后的css
    |   |-- senguo.m.ui.js                  //组件打包后的js文件,不包含vue.js,可在webpack.pro.js中更改文件打包后的命名
    |-- examples
    |   |-- index.html                      //开发环境下index.html
    |   |-- index.js                        //开发环境下入口文件
    |   |-- src
    |       |-- app.vue                     //vue文件入口,类似vue cli
    |       |-- components                  //自定义的vue页面或者组件
    |       |   |-- header.vue
    |       |   |-- main.vue
    |       |   |-- nav.vue
    |       |-- doc                         //以下文件会通过命令生成,对应每一个组件的示例以及文档,可以在md文件中编写vue语法
    |       |   |-- alert.md                //此文件中有示例
    |       |   |-- dialog.md
    |       |   |-- table.md
    |       |-- router
    |           |-- nav.config.json         //此文件是开发环境下的路由配置,可以自行编写路由,创建组件和删除组件时,会自动更改里面的内容
    |           |-- router.config.js        //此文件是自动生成的
    |-- src
        |-- components.json                 //此文件是自动生成的组件配置列表
        |-- entry.js                        //此文件是自动生成的入口文件
        |-- packages                        //需要编写的组件文件,内容是自动生成的
        |   |-- alert
        |   |   |-- WechatIMG5.png
        |   |   |-- index.js
        |   |   |-- src
        |   |       |-- main.scss
        |   |       |-- main.vue
        |   |-- dialog
        |   |   |-- index.js
        |   |   |-- src
        |   |       |-- main.scss
        |   |       |-- main.vue
        |   |-- table
        |       |-- index.js
        |       |-- src
        |           |-- main.scss
        |           |-- main.vue
        |-- style                           //样式文件
            |-- common                      //公共样式文件,组件会自动引入
                |-- functions.scss
                |-- mixins.scss
                |-- variable.scss