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

generator-umi-all

v1.2.0

Published

> 全局安装yoeman ``` yarn add global yo ```

Downloads

98

Readme

umi-all

全局安装yoeman yarn add global yo

安装模块依赖

yarn add yeoman-generator --dev

更新

本地更新,yarn link到仓库

使用:

yo umi-all 创建基本文件目录

基本目录

|- src
  |- assets
    // 图片资源
  |- components
    |- Footer // 共用组件
    |- Header // 共用组件
    |- Part // 共用组件
  |- layouts
    |- index.js // 通用模板
  |- models
    |- home.js // redux数据仓库
  |- pages
    |- document.ejs // html模板
    |- index.js // 项目入口文件
  |- service // 请求
    |- config.js // 本地、打包请求包装
    |- request.js // 请求封装
    |- home.js // 事例
  |- utils // 工具函数
  |- app.js // dva配置
|- .editorconfig
|- .env
|- .eslintrc
|- .prettierignore
|- .prettierrc
|- .umirc.js
|- package.json
|- webpack.config.js

通用函数

/utils/index.js

getOS() // 获取操作系统
Browse() // 获得浏览器属性
arrayShuffle() // 打乱数组
isUrl() // 判断是否是url
isBase64() // 判断base64
addHttp() // 链接默认添加http头
getRandom() // 获取指定范围随机数
formatSize() // 文件尺寸格式化
once() // 只执行一次函数,防抖
minName() // 缩减长文件名称
downloadFile() // 下载文件,通用
acceptFileType // 自定义上传可接受文件格式

第一步:封装基本文件夹目录

简单的拷贝项目工作基本文件目录

第二步:封装工作流

将依赖npm包及项目优化代码封装,最终暴露打包运行方式(类似umi)ing...

第三步:自定义工作流

可扩充,可自定义式工作流 loading...