├── .editorconfig ├── .gitignore ├── .prettierrc ├── README.md ├── babel.config.js ├── example ├── apiInject │ ├── App.js │ ├── index.html │ └── main.js ├── compiler-base │ ├── App.js │ ├── index.html │ └── main.js ├── componentEmit │ ├── App.js │ ├── Foo.js │ ├── index.html │ └── main.js ├── componentSlots │ ├── App.js │ ├── Foo.js │ ├── index.html │ └── main.js ├── componentUpdate │ ├── App.js │ ├── Child.js │ ├── index.html │ └── main.js ├── currentInstance │ ├── App.js │ ├── Foo.js │ ├── index.html │ └── main.js ├── customRender │ ├── App.js │ ├── index.html │ └── main.js ├── helloword │ ├── App.js │ ├── Foo.js │ ├── index.html │ └── main.js ├── nextTick │ ├── App.js │ ├── index.html │ └── main.js ├── patchChildren │ ├── App.js │ ├── ArrayToArray.js │ ├── ArrayToText.js │ ├── TextToArray.js │ ├── TextToText.js │ ├── index.html │ └── main.js └── update │ ├── App.js │ ├── index.html │ └── main.js ├── index.js ├── lib ├── guide-mini-vue.cjs.js └── guide-mini-vue.esm.js ├── package.json ├── rollup.config.js ├── src ├── compiler-core │ ├── src │ │ ├── ast.ts │ │ ├── codegen.ts │ │ ├── compile.ts │ │ ├── index.ts │ │ ├── parse.ts │ │ ├── runtimeHelpers.ts │ │ ├── transform.ts │ │ ├── transforms │ │ │ ├── transformElement.ts │ │ │ ├── transformExpression.ts │ │ │ └── transformText.ts │ │ └── utils.ts │ └── tests │ │ ├── __snapshots__ │ │ └── codegen.spec.ts.snap │ │ ├── codegen.spec.ts │ │ ├── parse.spec.ts │ │ └── transform.spec.ts ├── index.ts ├── reactivity │ ├── baseHandler.ts │ ├── computed.ts │ ├── effect.ts │ ├── enum.ts │ ├── index.ts │ ├── reactive.ts │ ├── ref.ts │ └── tests │ │ ├── computed.spec.ts │ │ ├── effect.spec.ts │ │ ├── reactive.spec.ts │ │ ├── readonly.spec.ts │ │ ├── ref.spec.ts │ │ └── shallowReadonly.spec.ts ├── runtime-core │ ├── apiInject.ts │ ├── component.ts │ ├── componentEmit.ts │ ├── componentProps.ts │ ├── componentPublicInstance.ts │ ├── componentSlots.ts │ ├── componentUpdateUtils.ts │ ├── createApp.ts │ ├── h.ts │ ├── helpers │ │ └── renderSlots.ts │ ├── index.ts │ ├── render.ts │ ├── scheduler.ts │ └── vnode.ts ├── runtime-dom │ └── index.ts └── shared │ ├── ShapeFlags.ts │ ├── index.ts │ └── toDisplayString.ts ├── tsconfig.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/.editorconfig -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/.prettierrc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/README.md -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/babel.config.js -------------------------------------------------------------------------------- /example/apiInject/App.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/apiInject/App.js -------------------------------------------------------------------------------- /example/apiInject/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/apiInject/index.html -------------------------------------------------------------------------------- /example/apiInject/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/apiInject/main.js -------------------------------------------------------------------------------- /example/compiler-base/App.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/compiler-base/App.js -------------------------------------------------------------------------------- /example/compiler-base/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/compiler-base/index.html -------------------------------------------------------------------------------- /example/compiler-base/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/compiler-base/main.js -------------------------------------------------------------------------------- /example/componentEmit/App.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentEmit/App.js -------------------------------------------------------------------------------- /example/componentEmit/Foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentEmit/Foo.js -------------------------------------------------------------------------------- /example/componentEmit/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentEmit/index.html -------------------------------------------------------------------------------- /example/componentEmit/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentEmit/main.js -------------------------------------------------------------------------------- /example/componentSlots/App.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentSlots/App.js -------------------------------------------------------------------------------- /example/componentSlots/Foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentSlots/Foo.js -------------------------------------------------------------------------------- /example/componentSlots/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentSlots/index.html -------------------------------------------------------------------------------- /example/componentSlots/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentSlots/main.js -------------------------------------------------------------------------------- /example/componentUpdate/App.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentUpdate/App.js -------------------------------------------------------------------------------- /example/componentUpdate/Child.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentUpdate/Child.js -------------------------------------------------------------------------------- /example/componentUpdate/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentUpdate/index.html -------------------------------------------------------------------------------- /example/componentUpdate/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/componentUpdate/main.js -------------------------------------------------------------------------------- /example/currentInstance/App.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/currentInstance/App.js -------------------------------------------------------------------------------- /example/currentInstance/Foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/currentInstance/Foo.js -------------------------------------------------------------------------------- /example/currentInstance/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/currentInstance/index.html -------------------------------------------------------------------------------- /example/currentInstance/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/currentInstance/main.js -------------------------------------------------------------------------------- /example/customRender/App.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/customRender/App.js -------------------------------------------------------------------------------- /example/customRender/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/customRender/index.html -------------------------------------------------------------------------------- /example/customRender/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/customRender/main.js -------------------------------------------------------------------------------- /example/helloword/App.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/helloword/App.js -------------------------------------------------------------------------------- /example/helloword/Foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/helloword/Foo.js -------------------------------------------------------------------------------- /example/helloword/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/helloword/index.html -------------------------------------------------------------------------------- /example/helloword/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/helloword/main.js -------------------------------------------------------------------------------- /example/nextTick/App.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/nextTick/App.js -------------------------------------------------------------------------------- /example/nextTick/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/nextTick/index.html -------------------------------------------------------------------------------- /example/nextTick/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/nextTick/main.js -------------------------------------------------------------------------------- /example/patchChildren/App.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/patchChildren/App.js -------------------------------------------------------------------------------- /example/patchChildren/ArrayToArray.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/patchChildren/ArrayToArray.js -------------------------------------------------------------------------------- /example/patchChildren/ArrayToText.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/patchChildren/ArrayToText.js -------------------------------------------------------------------------------- /example/patchChildren/TextToArray.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/patchChildren/TextToArray.js -------------------------------------------------------------------------------- /example/patchChildren/TextToText.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/patchChildren/TextToText.js -------------------------------------------------------------------------------- /example/patchChildren/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/patchChildren/index.html -------------------------------------------------------------------------------- /example/patchChildren/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/patchChildren/main.js -------------------------------------------------------------------------------- /example/update/App.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/update/App.js -------------------------------------------------------------------------------- /example/update/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/update/index.html -------------------------------------------------------------------------------- /example/update/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/example/update/main.js -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/index.js -------------------------------------------------------------------------------- /lib/guide-mini-vue.cjs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/lib/guide-mini-vue.cjs.js -------------------------------------------------------------------------------- /lib/guide-mini-vue.esm.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/lib/guide-mini-vue.esm.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/package.json -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/rollup.config.js -------------------------------------------------------------------------------- /src/compiler-core/src/ast.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/src/ast.ts -------------------------------------------------------------------------------- /src/compiler-core/src/codegen.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/src/codegen.ts -------------------------------------------------------------------------------- /src/compiler-core/src/compile.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-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/TTiip/my-mini-vue/HEAD/src/compiler-core/src/parse.ts -------------------------------------------------------------------------------- /src/compiler-core/src/runtimeHelpers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/src/runtimeHelpers.ts -------------------------------------------------------------------------------- /src/compiler-core/src/transform.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/src/transform.ts -------------------------------------------------------------------------------- /src/compiler-core/src/transforms/transformElement.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/src/transforms/transformElement.ts -------------------------------------------------------------------------------- /src/compiler-core/src/transforms/transformExpression.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/src/transforms/transformExpression.ts -------------------------------------------------------------------------------- /src/compiler-core/src/transforms/transformText.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/src/transforms/transformText.ts -------------------------------------------------------------------------------- /src/compiler-core/src/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/src/utils.ts -------------------------------------------------------------------------------- /src/compiler-core/tests/__snapshots__/codegen.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/tests/__snapshots__/codegen.spec.ts.snap -------------------------------------------------------------------------------- /src/compiler-core/tests/codegen.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/tests/codegen.spec.ts -------------------------------------------------------------------------------- /src/compiler-core/tests/parse.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/tests/parse.spec.ts -------------------------------------------------------------------------------- /src/compiler-core/tests/transform.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/compiler-core/tests/transform.spec.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/reactivity/baseHandler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/baseHandler.ts -------------------------------------------------------------------------------- /src/reactivity/computed.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/computed.ts -------------------------------------------------------------------------------- /src/reactivity/effect.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/effect.ts -------------------------------------------------------------------------------- /src/reactivity/enum.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/enum.ts -------------------------------------------------------------------------------- /src/reactivity/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ref' -------------------------------------------------------------------------------- /src/reactivity/reactive.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/reactive.ts -------------------------------------------------------------------------------- /src/reactivity/ref.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/ref.ts -------------------------------------------------------------------------------- /src/reactivity/tests/computed.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/tests/computed.spec.ts -------------------------------------------------------------------------------- /src/reactivity/tests/effect.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/tests/effect.spec.ts -------------------------------------------------------------------------------- /src/reactivity/tests/reactive.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/tests/reactive.spec.ts -------------------------------------------------------------------------------- /src/reactivity/tests/readonly.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/tests/readonly.spec.ts -------------------------------------------------------------------------------- /src/reactivity/tests/ref.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/tests/ref.spec.ts -------------------------------------------------------------------------------- /src/reactivity/tests/shallowReadonly.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/reactivity/tests/shallowReadonly.spec.ts -------------------------------------------------------------------------------- /src/runtime-core/apiInject.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/apiInject.ts -------------------------------------------------------------------------------- /src/runtime-core/component.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/component.ts -------------------------------------------------------------------------------- /src/runtime-core/componentEmit.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/componentEmit.ts -------------------------------------------------------------------------------- /src/runtime-core/componentProps.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/componentProps.ts -------------------------------------------------------------------------------- /src/runtime-core/componentPublicInstance.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/componentPublicInstance.ts -------------------------------------------------------------------------------- /src/runtime-core/componentSlots.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/componentSlots.ts -------------------------------------------------------------------------------- /src/runtime-core/componentUpdateUtils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/componentUpdateUtils.ts -------------------------------------------------------------------------------- /src/runtime-core/createApp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/createApp.ts -------------------------------------------------------------------------------- /src/runtime-core/h.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/h.ts -------------------------------------------------------------------------------- /src/runtime-core/helpers/renderSlots.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/helpers/renderSlots.ts -------------------------------------------------------------------------------- /src/runtime-core/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/index.ts -------------------------------------------------------------------------------- /src/runtime-core/render.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/render.ts -------------------------------------------------------------------------------- /src/runtime-core/scheduler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/scheduler.ts -------------------------------------------------------------------------------- /src/runtime-core/vnode.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-core/vnode.ts -------------------------------------------------------------------------------- /src/runtime-dom/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/runtime-dom/index.ts -------------------------------------------------------------------------------- /src/shared/ShapeFlags.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/shared/ShapeFlags.ts -------------------------------------------------------------------------------- /src/shared/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/shared/index.ts -------------------------------------------------------------------------------- /src/shared/toDisplayString.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/src/shared/toDisplayString.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/tsconfig.json -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TTiip/my-mini-vue/HEAD/yarn.lock --------------------------------------------------------------------------------