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

cmui-gearbox

v0.7.1

Published

Lightweight JavaScript utilities for web development.

Downloads

29

Readme

Gearbox

Lightweight JavaScript utilities for web development, based on _ (Underscore) and $ (jQuery/Zepto).

为 Web 开发打造的轻量级 Javascript 工具库,基于 _(Underscore)和 $(jQuery/Zepto)。

兼容性

浏览器支持

  • 支持以下移动平台的主流浏览器:

    • iOS 7+
    • Android 4+
  • 同样支持以下桌面浏览器:

    • Firefox (Latest)
    • Chrome (Latest)
    • Safari (Latest)
    • IE 8+(需要 jQuery 1.x)

外部依赖

  • _(Underscore 1.6+)
  • $(Zepto 1.1+ 或 jQuery)

安装

  1. 通过 npm 3 安装:

    $ npm install cmui-gearbox
  2. 在页面中加载 Gearbox 以及必要的依赖:

    <script src="node_modules/underscore/underscore-min.js"></script>
    <script src="node_modules/zepto.js/dist/zepto.min.js"></script>
    <script src="node_modules/cmui-gearbox/dist/gearbox.min.js"></script>

API 文档

所有文档入口在 Wiki 页面,快去看吧!

谁在用?

移动 UI 框架 CMUI 采用 Gearbox 作为全局的工具库,因此所有 CMUI 用户都在使用它:

  • 百姓网 - 手机版
  • ~~优e网 - 手机版 (m.uemall.com)~~(已下线)
  • ~~薇姿官方电子商城 - 手机版 (m.vichy.com.cn)~~(已改版)

以下桌面网站也在用 Gearbox:


参与开发

功能模块

Gearbox 的部分功能模块已经分离出去,成为独立项目。这些模块以开发依赖的方式引入,并打包到发布文件中。因此,参与这些独立项目的开发即可修改这些模块。

构建

  1. 把本项目的代码 fork 并 clone 到本地。
  2. 在项目根目录执行 npm install,安装必要的依赖。
  3. 在项目根目录执行 npm run dist,运行构建脚本。
  4. 构建生成的发布文件将存放在 /dist 目录下。

单元测试

  1. 把本项目的代码 fork 并 clone 到本地。
  2. 在项目根目录执行 bower install,安装必要的依赖。
  3. 在浏览器中打开以下文件即可运行单元测试:
    • test/test-dev.html - 测试源码(用于开发阶段的测试)
    • test/test-dist-trad.html - 测试发布文件(用于测试 Zepto 的兼容性)
    • test/test-dist-trad-jquery.html - 测试发布文件(用于测试 jQuery 的兼容性)

License

MIT License