├── .DS_Store ├── .gitignore ├── .vscode └── settings.json ├── README.md ├── docs ├── imgs │ ├── computed.png │ ├── effect.png │ ├── moduleResolution.png │ ├── reactive.png │ ├── ref.png │ └── vue3思维导图.png ├── note.md ├── reactive.md └── think.md ├── example ├── compiler.html ├── componentUpdate │ ├── index.html │ └── nextTick.html ├── craeteRender.html ├── effect.html ├── helloworld.html ├── patchChildren │ ├── ArrayToArray.html │ ├── ArrayToText.html │ ├── TextToArray.html │ └── 中间不同.html ├── reactive.html └── updateView.html ├── jest.config.js ├── package.json ├── rollup.config.js ├── src ├── compiler-core │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ └── codegen.spec.ts.snap │ │ ├── codegen.spec.ts │ │ ├── parse.spec.ts │ │ └── transform.spec.ts │ └── src │ │ ├── ast.ts │ │ ├── codegen.ts │ │ ├── compile.ts │ │ ├── index.ts │ │ ├── parse.ts │ │ ├── runtimeHelper.ts │ │ ├── transform.ts │ │ └── transforms │ │ ├── transformElement.ts │ │ ├── transformExpression.ts │ │ └── transformText.ts ├── global.d.ts ├── index.ts ├── other │ ├── __test__ │ │ └── stateMachine.spec.ts │ └── src │ │ └── stateMachine.ts ├── reactivity │ ├── __tests__ │ │ ├── computed.spec.ts │ │ ├── effect.spec.ts │ │ ├── reactive.spec.ts │ │ ├── ref.spec.ts │ │ └── shallowReadonly.spec.ts │ └── src │ │ ├── baseHandlers.ts │ │ ├── computed.ts │ │ ├── dep.ts │ │ ├── effect.ts │ │ ├── index.ts │ │ ├── reactive.ts │ │ └── ref.ts ├── runtime-core │ ├── apiInject.ts │ ├── component.ts │ ├── componentEmit.ts │ ├── componentProps.ts │ ├── componentPublicInstance.ts │ ├── componentSlots.ts │ ├── componentUpdateUtils.ts │ ├── createApp.ts │ ├── helper │ │ └── renderSlots.ts │ ├── index.ts │ ├── renderer.ts │ ├── scheduler.ts │ ├── shapeFlags.ts │ └── vnode.ts ├── runtime-dom │ └── index.ts └── shared │ ├── index.ts │ └── toDisplayString.ts ├── tsconfig.json ├── yarn-error.log └── yarn.lock /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | lib -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "liveServer.settings.port": 5501 3 | } 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/README.md -------------------------------------------------------------------------------- /docs/imgs/computed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/docs/imgs/computed.png -------------------------------------------------------------------------------- /docs/imgs/effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/docs/imgs/effect.png -------------------------------------------------------------------------------- /docs/imgs/moduleResolution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/docs/imgs/moduleResolution.png -------------------------------------------------------------------------------- /docs/imgs/reactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/docs/imgs/reactive.png -------------------------------------------------------------------------------- /docs/imgs/ref.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/docs/imgs/ref.png -------------------------------------------------------------------------------- /docs/imgs/vue3思维导图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/docs/imgs/vue3思维导图.png -------------------------------------------------------------------------------- /docs/note.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/docs/note.md -------------------------------------------------------------------------------- /docs/reactive.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/docs/reactive.md -------------------------------------------------------------------------------- /docs/think.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/docs/think.md -------------------------------------------------------------------------------- /example/compiler.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/compiler.html -------------------------------------------------------------------------------- /example/componentUpdate/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/componentUpdate/index.html -------------------------------------------------------------------------------- /example/componentUpdate/nextTick.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/componentUpdate/nextTick.html -------------------------------------------------------------------------------- /example/craeteRender.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/craeteRender.html -------------------------------------------------------------------------------- /example/effect.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/effect.html -------------------------------------------------------------------------------- /example/helloworld.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/helloworld.html -------------------------------------------------------------------------------- /example/patchChildren/ArrayToArray.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/patchChildren/ArrayToArray.html -------------------------------------------------------------------------------- /example/patchChildren/ArrayToText.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/patchChildren/ArrayToText.html -------------------------------------------------------------------------------- /example/patchChildren/TextToArray.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/patchChildren/TextToArray.html -------------------------------------------------------------------------------- /example/patchChildren/中间不同.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/patchChildren/中间不同.html -------------------------------------------------------------------------------- /example/reactive.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/reactive.html -------------------------------------------------------------------------------- /example/updateView.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/example/updateView.html -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/jest.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/package.json -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/rollup.config.js -------------------------------------------------------------------------------- /src/compiler-core/__tests__/__snapshots__/codegen.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/__tests__/__snapshots__/codegen.spec.ts.snap -------------------------------------------------------------------------------- /src/compiler-core/__tests__/codegen.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/__tests__/codegen.spec.ts -------------------------------------------------------------------------------- /src/compiler-core/__tests__/parse.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/__tests__/parse.spec.ts -------------------------------------------------------------------------------- /src/compiler-core/__tests__/transform.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/__tests__/transform.spec.ts -------------------------------------------------------------------------------- /src/compiler-core/src/ast.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/src/ast.ts -------------------------------------------------------------------------------- /src/compiler-core/src/codegen.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/src/codegen.ts -------------------------------------------------------------------------------- /src/compiler-core/src/compile.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/src/compile.ts -------------------------------------------------------------------------------- /src/compiler-core/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./compile"; 2 | -------------------------------------------------------------------------------- /src/compiler-core/src/parse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/src/parse.ts -------------------------------------------------------------------------------- /src/compiler-core/src/runtimeHelper.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/src/runtimeHelper.ts -------------------------------------------------------------------------------- /src/compiler-core/src/transform.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/src/transform.ts -------------------------------------------------------------------------------- /src/compiler-core/src/transforms/transformElement.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/src/transforms/transformElement.ts -------------------------------------------------------------------------------- /src/compiler-core/src/transforms/transformExpression.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/src/transforms/transformExpression.ts -------------------------------------------------------------------------------- /src/compiler-core/src/transforms/transformText.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/compiler-core/src/transforms/transformText.ts -------------------------------------------------------------------------------- /src/global.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/other/__test__/stateMachine.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/other/__test__/stateMachine.spec.ts -------------------------------------------------------------------------------- /src/other/src/stateMachine.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/other/src/stateMachine.ts -------------------------------------------------------------------------------- /src/reactivity/__tests__/computed.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/__tests__/computed.spec.ts -------------------------------------------------------------------------------- /src/reactivity/__tests__/effect.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/__tests__/effect.spec.ts -------------------------------------------------------------------------------- /src/reactivity/__tests__/reactive.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/__tests__/reactive.spec.ts -------------------------------------------------------------------------------- /src/reactivity/__tests__/ref.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/__tests__/ref.spec.ts -------------------------------------------------------------------------------- /src/reactivity/__tests__/shallowReadonly.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/__tests__/shallowReadonly.spec.ts -------------------------------------------------------------------------------- /src/reactivity/src/baseHandlers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/src/baseHandlers.ts -------------------------------------------------------------------------------- /src/reactivity/src/computed.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/src/computed.ts -------------------------------------------------------------------------------- /src/reactivity/src/dep.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/src/dep.ts -------------------------------------------------------------------------------- /src/reactivity/src/effect.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/src/effect.ts -------------------------------------------------------------------------------- /src/reactivity/src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/src/index.ts -------------------------------------------------------------------------------- /src/reactivity/src/reactive.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/src/reactive.ts -------------------------------------------------------------------------------- /src/reactivity/src/ref.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/reactivity/src/ref.ts -------------------------------------------------------------------------------- /src/runtime-core/apiInject.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/apiInject.ts -------------------------------------------------------------------------------- /src/runtime-core/component.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/component.ts -------------------------------------------------------------------------------- /src/runtime-core/componentEmit.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/componentEmit.ts -------------------------------------------------------------------------------- /src/runtime-core/componentProps.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/componentProps.ts -------------------------------------------------------------------------------- /src/runtime-core/componentPublicInstance.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/componentPublicInstance.ts -------------------------------------------------------------------------------- /src/runtime-core/componentSlots.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/componentSlots.ts -------------------------------------------------------------------------------- /src/runtime-core/componentUpdateUtils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/componentUpdateUtils.ts -------------------------------------------------------------------------------- /src/runtime-core/createApp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/createApp.ts -------------------------------------------------------------------------------- /src/runtime-core/helper/renderSlots.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/helper/renderSlots.ts -------------------------------------------------------------------------------- /src/runtime-core/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/index.ts -------------------------------------------------------------------------------- /src/runtime-core/renderer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/renderer.ts -------------------------------------------------------------------------------- /src/runtime-core/scheduler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/scheduler.ts -------------------------------------------------------------------------------- /src/runtime-core/shapeFlags.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/shapeFlags.ts -------------------------------------------------------------------------------- /src/runtime-core/vnode.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-core/vnode.ts -------------------------------------------------------------------------------- /src/runtime-dom/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/runtime-dom/index.ts -------------------------------------------------------------------------------- /src/shared/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/shared/index.ts -------------------------------------------------------------------------------- /src/shared/toDisplayString.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/src/shared/toDisplayString.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/tsconfig.json -------------------------------------------------------------------------------- /yarn-error.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/yarn-error.log -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellingfordly/mini-vue/HEAD/yarn.lock --------------------------------------------------------------------------------