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

mjolnir-ui

v0.2.0

Published

React component library by cregskin

Downloads

6

Readme

Mjolnir - 一个酷酷的 react UI 库

1. 图片

  • 上古时期 - 雪碧图 (CSS Sprite)
  • font icon
  • svg icon + 完全可控
    • svg 即取即用

    • font icon 有奇怪的 bug(没加载好的时候是方框)

      借用库 react-fontawesome

2. 动画组件封装

3. 开发痛点

痛点

  1. cra入口文件不适合管理组件库
  2. 缺少行为追踪和属性调试功能

需求

  1. 分开展示各个组件不同属性下的状态
  2. 能追踪组件的行为并且具有属性调试功能
  3. 为组件生成文档和属性列表 - story book

4. storybook addon

  1. 样式修饰器
  2. native addon https://storybook.js.org/addons/
  3. 对action做响应
  4. knobs 对手动输入属性做响应
  5. info-addon

Input

  1. 分析属性
<Input
  disabled
  size="lg|sm"
  icon="fontwesome 支持的图标"
  prepand="input 前缀,string 或者 ReactElement"
  append="input 后缀,string 或者 ReactElement"
  {...restProps} 支持其他所有的HTMLInput属性
/>
  1. Omit 忽略指定类型中某个属性

Upload

  1. fetch 缺点

  2. 只对网络请求报错,对400,500当作成功

  3. 默认不带cookie,需要配置头部

  4. 不支持abort,不支持超时控制

  5. 没有onProcess,不支持进度监控

  6. 上传文件

  • ajax 异步上传
  • form
    • multipart/form-data 上传二进制文件最好的格式
    • application/x-www-form-urlencoded 表单默认,大量二进制很低效
    • text/plain

rimraf 跨平台删除工具

npm link

让项目依赖link到本地目录