Code Monkey home page Code Monkey logo

chibivue-original's Introduction


chibivue is minimal vuejs/core implementations.
(Reactivity System, Virtual DOM and Patch Rendering, Component System, Template Compiler, SFC Compiler)

"chibi" means "small" in Japanese.

This project began in February 2023 with the goal of simplifying the understanding of Vue's core implementation.

Currently, I am still in the process of implementation, but after implementation, I intend to post explanatory articles as well.

(For now, I plan to post Japanese first.)

example

๐Ÿ‘œ Package Manager

This project uses pnpm as a package manager.

And use ni .

# if you don't have ni yet
npm i -g @antfu/ni

๐Ÿ“” Online Book

Pages Deploy

total: 370,000 chars โ†‘ (japanese)

book url (GitHub Pages)

English: https://ubugeeei.github.io/chibivue/en

Japaneses: https://ubugeeei.github.io/chibivue

open book on localhost

$ git clone https://github.com/Ubugeeei/chibivue
$ cd chibivue
$ ni
$ nr book:dev

view on github

English | Japanese

๐ŸŽฅ playground

$ git clone https://github.com/Ubugeeei/chibivue
$ cd chibivue
$ ni

# generate playground files to ~/example/playground (git ignored)
$ nr setup:dev

# listen localhost
$ nr dev

โš ๏ธ status

This online book is currently a work in progress.

Please refer to the information below for the progress status.

Reactivity System

feature impl book
ref โœ… โœ…
computed โœ… โœ…
reactive โœ… โœ…
readonly โœ… โœ…
watch โœ… โœ…
watchEffect โœ… โœ…
isRef โœ… โœ…
unref โœ… โœ…
toRef โœ… โœ…
toRefs โœ… โœ…
isProxy โœ… โœ…
isReactive โœ… โœ…
isReadonly โœ… โœ…
shallowRef โœ… โœ…
triggerRef โœ… โœ…
shallowReactive โœ… โœ…
customRef โœ… โœ…
toRaw โœ… โœ…
effectScope โœ… โœ…
getCurrentScope โœ… โœ…
onScopeDispose โœ… โœ…
template refs โœ… โœ…

Virtual Dom & Renderer

feature impl book
h function โœ… โœ…
patch rendering โœ… โœ…
key attribute โœ… โœ…
scheduler โœ… โœ…
nextTick โœ… โœ…
ssr

Component System

feature impl book
Options API (typed) โœ… โœ…
Composition API โœ… โœ…
lifecycle hooks โœ… โœ…
props / emit โœ… โœ…
expose โœ… โœ…
provide / inject โœ… โœ…
slot (default) โœ… โœ…
slot (named/scoped) โœ… โœ…
async component and suspense

Template Compiler

feature impl book
v-bind โœ… โœ…
v-on โœ… โœ…
event modifier โœ… โœ…
v-if โœ… โœ…
v-for โœ… โœ…
v-model โœ…
v-show
mustache โœ… โœ…
slot (default)
slot (named)
slot (scoped)
dynamic component
comment out โœ… โœ…
fragment โœ… โœ…
bind expressions โœ… โœ…
resolve components โœ… โœ…

SFC Compiler

feature impl book
basics (template, script, style) โœ… โœ…
scoped css
script setup โœ…
compiler macro โœ…

Extensions and Other Builtin

feature impl book
store โœ…
router โœ…
keep-alive
suspense

๐Ÿ—“๏ธ Big Plans

  • Complete Basic Template Compiler
    • Slots
  • Complete Basic SFC Compiler
    • script setup
    • compiler macro
  • Overall restructuring
    • Fixing typos and errors
    • Reviewing English version of the text
    • Making explanations more understandable
  • Implementation and explanation of SSR / SSG
  • Implementation and explanation of compile-time optimization
    Tree flattening and static hoisting, among others
  • Incorporate refactoring of the parser that will likely be included in Vue.js 3.4
    ใ€€vuejs/core#9674
  • Incorporate refactoring of the reactivity package that will likely be included in Vue.js 3.4
    vuejs/core#5912
  • ๐ŸŒŸ Implementation and explanation of **Vapor Mode**
    Since the official version has not been released, we will implement it based on our predictions.
    https://github.com/vuejs/core-vapor/tree/main

๐ŸŽ‰ Bonus Track

This is bonus track on writing Vue.js in 15 minutes because chibivue has gotten so big.

This chapter implements createApp / virtual dom / patch / reactivity / template compiler / sfc compiler in just 110 lines of source code.

The title is "Hyper Ultimate Super Extreme Minimal Vue - writing Vue.js on 15 minutes"

Online Book | Actual Source

Contributing

Please see contributing.md.

chibivue-original's People

Contributors

ubugeeei avatar madogiwa0124 avatar ponyoxa avatar ren-yamanashi avatar 2nofa11 avatar stutkhd-0709 avatar ikexing-cn avatar aipacommander avatar heavenosk avatar tsukiyama-3 avatar l4dybird avatar miyuesc avatar yamanoku avatar reona5 avatar sor4chi avatar koji-nishimura avatar mesichicken avatar shoma-mano avatar taichi221228 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.