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

@linteng/airui

v0.0.8

Published

集成web-component组件库, js插件, 主题库的微型开发框架

Downloads

1

Readme

Air-UI

  1. 一个基于rollup搭建的, 参考开源框架wcui, 集成web-component组件库, js插件, 主题库的微型开发框架
  2. 寓意是希望能打造一款像空气一样轻, 无杂质(不花里胡哨), 并且能成为刚需(很狂哈哈哈~)的组件工具库

为什么

  1. 技术沉淀, 需要载体进行承载, 而载体, 能带来统一规范, 有利于库的不断扩展, 不断为业务输血
  2. 市场上众多第三方库, 虽比较实用, 但需要满足大多数场景下的使用, 所以集成较多功能, 较为臃肿。本框架旨在打造轻量级实用的依赖库
  3. 可以无视框架, 无缝嵌入任意vue/react/angular/anot/jquery/native js项目上
  4. 未雨绸缪, 开发无框架组件的同时也可以开发js插件, 主题库

开发环境及生产环境

# 安装依赖
npm install

# 开发环境
npm run dev 

# 生产环境
npm run build:<format> // amd、cjs、esm、iife、umd、system, 默认esm

# 本地预览
npm run build:<format> // amd、cjs、esm、iife、umd、system, 默认esm

本地预览

// 配置ngnix
server {
  listen     80;
  root	     /path/to/airui/dist;
  index	     index.html;
}
http://localhost/path/to/airui/dist/index-vue.html

规范

  1. 主题库的设计需根据ui规范来
  2. js插件默认以esm格式打包输出
  3. 使用wc组件
  • 生命周期: mount(组件挂载时), unmount(组件卸载时), watch(组件更新时), adopted(组件移动至不同页面时)
  • 通过在html中来引入,
  • 在第三方框架项目中直接import引入
  • 通过使用
  • 组件样式命名, .air-ui-<组件名> { .<组件名>-<组件内部组成> {} }

目录概述

├── README.md
├── compile         // 编译脚本目录
│   ├── build.js    // 改版前遗留问题, 先留存备份
│   ├── config
│   │   └── ignore.watch.json     // 不需要监控的文件列表
│   ├── handler     // 不同format文件的编译脚本
│   │   ├── index.js
│   │   ├── js.js
│   │   ├── less.js
│   │   └── wc.js
│   ├── index.js
│   ├── rollup.config.js    // 不同format文件rollup配置统一管理
│   └── utils       // 编译脚本通用的函数库
│       ├── date.js
│       └── index.js        // 部分代码为改版前遗留问题, 先留存备份
├── dist            // 打包输出目录
│   ├── index.js
│   └── package
│       ├── styles
│       ├── tools
│       ├── utils
│       └── wc
├── example         // 举个🌰
│   ├── index.html
│   └── src
│       ├── css
│       └── js
├── package-lock.json
├── package.json
├── src             // 本地开发目录
│   ├── config.js   // 打包配置, 目前暴露了alias参数处理, 同webpack resolve.alias
│   ├── index.js
│   └── package
│       ├── styles  // 主题库
│       ├── tools   // 函数库
│       ├── utils   // 本地开发需要通用的工具库
│       └── wc      // wc组件库
└── yarn.lock

开发进度&计划

  • [ ] 增加wc组件的render生命周期
  • [ ] 增加对tools/*.js的压缩混淆
  • [ ] 在线文档
  • [ ] 组件-按钮(wc-button)
  • [ ] 组件-单选框(wc-radio)
  • [ ] 组件-下拉选择(wc-select)
  • [ ] 组件-日期选择器(wc-datepicker)
  • [x] 组件-树形菜单(wc-tree)
  • [x] 组件-分页(wc-page)
  • [ ] 组件-上传(wc-upload)
  • [x] 函数-吸顶(sticky)
  • [ ] 函数-前端路由(router)
  • [x] 函数-资源请求(load-assets)
  • [x] 函数-网络请求(fetch)
  • [x] 函数-页面自适应(rem-adapter)
  • ...

感谢

  • 灵感来源: wcui
  • 打包技术栈: rollup
  • less生态: less
  • wc官方生态: Web Components
  • 模块化: amd、cjs、esm、iife、umd、system模块化区别