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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@asathinker/minipack

v1.0.1-alpha.2

Published

迷你打包工具

Readme

minipack

minipack 是一个前端打包工具和文档生成工具,是《人人都可以封装 webpack》文章的实现版本。

特别说明

文档样式参考 antd 文档样式,样例中的 markdown 文件拷贝自 antd 的官方文档。

minipack 打包效果 打包效果

minipack 解析 markdown 生成的文档效果图: 文档效果图

使用方法

全局安装

npm install -g @asathinker/minipack

常用命令

##编译模式
minipack build --mode dev ##编译开发版本
minipack build --mode prod ##编译正式版本
##开发模式
minipack server --mode dev ##开发模式
minipack server --mode prod ##正式代码预览
##文档模式
minipack doc --mode dev ##文档开发
minipack doc --mode prod ##正式文档预览

运行 demo

cd demo
yarn install
minipack server

源码编译 minipack,运行 demo

##安装依赖
yarn install
##编译minipack工具
yarn compile
##进入demo目录
cd demo
##安装demo依赖
yarn install
##打包模式
node ../bin/minipack.js build [--mode dev or prod]
##开发运行模式
node ../bin/minipack.js server [--mode dev or prod]
##文档模式
node ../bin/minipack.js doc [--mode dev or prod]

.minipackrc.js 配置文件说明

module.exports = {
  // 入口文件配置
  entry: 'src/pages/**/*js',
  // 输出设置
  output: { path: 'dist', publicPath: '/' },
  //devServer设置,具体参考https://www.webpackjs.com/configuration/dev-server/
  devServer: { port: 8000 },
  //doc配置
  doc: {
    // doc的入口
    entry: 'src/pages/doc.js',
    // docs所在的目录
    dir: 'src/components',
    // doc-loader的配置
    loaderOptions: { async: true }
  },
  // 额外的babel plugins设置
  extraBabelPlugins: [['import', { libraryName: 'antd', style: true }]],
  // 额外的babel presets设置
  extraBabelPresets: [],
  // webpack plugins设置
  extraPlugins: [],
  // 别名设置
  resolveAlias: {
    '@components': path.resolve(__dirname, 'src/components')
  },
  // less变量替换设置
  lessModifyVars: {},
  // webpack loaders
  extraLoaders: []
};

.minipackrc.mock.js 数据 mock 文件说明

module.exports = {
    "Mehod:Url":Object|Function,
    ...
}

Method: 网络请求方法:get、post、put、delete、patch、head、option……

Url: 网络请求地址

Object: 返回的 json 对象,Object 只适合返回类型是 json 的格式,如果返回类型是其他格式,请使用 Function

Function: 函数类型:(req, res) => void, req 是网络请求的 request,res 是网络请求的 response,具体可以参考express查看详细说明