v2.6.10
Vue (pronounced /vjuː/
, like view) is a progressive framework for building user interfaces.
# 安装依赖
npm install
# 安装打包工具
npm install rollup -g
# 执⾏打包 (修改examples 引用打包结果 vue.js)
npm run dev
scripts
: 包含构建相关的文件,一般情况下我们不需要动alias.js
: 别名配置config.js
: 生成 rollup 配置的文件
dist
: 构建后文件的输出目录examples
: 存放一些使用 Vue 开发的应用案例flow
: 类型声明,使用开源项目 Flowpackages
: 存放独立发布的包的目录test
: 包含所有测试文件src
: 这个是我们最应该关注的目录,包含了源码compiler
: 编译器代码的存放目录,将 template 编译为 render 函数core
: 存放通用的,平台无关的代码observer
: 响应系统,包含数据观测的核心代码vdom
: 包含虚拟 DOM 创建(creation)和打补丁(patching)的代码instance
: 包含 Vue 构造函数涉及相关的代码global-api
: 包含给 Vue 构造函数挂载全局方法(静态方法)或属性的代码components
: 包含抽象出来的通用组件
server
: 包含服务端渲染(server-side rendering)的相关代码platforms
: 包含平台特有的相关代码web/entry-runtime.js
: 运行时版本,不包含模板(template)到 render 函数的编译器,所以不支持template
选项web/entry-runtime-with-compiler.js
: 独立构建版本的入口,输出 dist/vue.js,它包含模板(template)到 render 函数的编译器 (入口文件)web/entry-compiler.js
: vue-template-compiler 包的入口文件runtime/index.js
编译入口使用的 Vue
sfc
: 包含单文件组件(.vue 文件)的解析逻辑,用于 vue-template-compiler 包shared
: 包含整个代码库通用的代码
To check out live examples and docs, visit vuejs.org.
Please make sure to read the Contributing Guide before making a pull request. If you have a Vue-related project/component/tool, add it with a pull request to this curated list!
- 《深入浅出的 Vuejs》
- HcySunYang
- 抽丝剥茧带你复习 vue 源码(2023 年面试版本)
- 浅曦 vue 源码
- processon vue 源码解析流程图
- Vue 原理解析 - diff 部分
- 精通 Vue 技术栈源码原理
- 《Vue.js 设计与实现》
- 《剖析 Vue.js 内部运行机制》
For questions and support please use the official forum or community chat. The issue list of this repo is exclusively for bug reports and feature requests.
Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.
Detailed changes for each release are documented in the release notes.
Copyright (c) 2013-present, Yuxi (Evan) You