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 🙏

© 2025 – Pkg Stats / Ryan Hefner

small-vue

v1.0.14

Published

简版vue3

Readme

small-vue

我们知道 vue 的源码非常庞大复杂,即使我们只学习其中部分核心包,其代码量依然惊人。因为这其中不仅有一些高级功能的实现,还有很多边缘情况的处理。这使我们阅读源码、理解源码变成一个很困难的过程,很容易被劝退。

因此我手写了一个简版的 vue3 源码:small-vue,只实现核心包中的核心逻辑,使代码尽量简单易理解。同时 small-vue 中的文件名、方法名都尽量与 vue3 源码中保持一致,有利于相互对照理解。

1. 实现功能

  • reactivity
    • [x] 支持 reactive,ref,computed 等响应式对象
    • [x] 支持 effect 函数监听响应式操作
    • [x] 基于 Jest 进行单元测试
  • runtime-core
    • [x] 支持元素类型、组件类型、虚拟类型、文本类型等多种虚拟节点
    • [x] 支持虚拟节点解析,初始化,更新等流程
    • [x] 支持双端 Diff 算法
    • [x] 支持 nextTick,queueJobs 等异步操作
    • [x] 支持 props、emit、provide、inject 等功能
    • [x] 支持插槽 Slots
    • [x] 支持 createRenderer,createApp 等入口函数
  • runtime-dom
    • [x] 支持 Dom 渲染器
  • compiler-core
    • [x] 支持 parse 操作,将 template 字符串转换成抽象语法树 AST
    • [x] 支持 transform 操作,遍历 AST 进行某些转换处理
    • [x] 支持 codegen 操作,将 AST 转成成 render 函数
  • vue
    • [x] 合并编译时和运行时,作为程序主入口
    • [x] 编写 examples 测试整个程序