Skip to content

Commit 7d6a379

Browse files
authored
Merge pull request vuejs#2 from vuejs/next
Next sync
2 parents f86a47d + 96444ff commit 7d6a379

File tree

231 files changed

+25300
-15229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+25300
-15229
lines changed

.babelrc

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
{
2-
"env": {
3-
"development": {
4-
"presets": ["es2015", "flow-vue"]
5-
},
6-
"production": {
7-
"presets": ["es2015-rollup-vue", "flow-vue"]
8-
}
9-
},
2+
"presets": ["es2015", "flow-vue"],
103
"ignore": [
11-
"dist/*.js"
4+
"dist/*.js",
5+
"packages/**/*.js"
126
]
137
}

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
flow
22
dist
3+
packages

.flowconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ module.name_mapper='^shared/\(.*\)$' -> '<PROJECT_ROOT>/src/shared/\1'
1717
module.name_mapper='^web/\(.*\)$' -> '<PROJECT_ROOT>/src/platforms/web/\1'
1818
module.name_mapper='^server/\(.*\)$' -> '<PROJECT_ROOT>/src/server/\1'
1919
module.name_mapper='^entries/\(.*\)$' -> '<PROJECT_ROOT>/src/entries/\1'
20-
module.name_mapper='^entities$' -> '<PROJECT_ROOT>/src/compiler/parser/entity-decoder'
20+
module.name_mapper='^sfc/\(.*\)$' -> '<PROJECT_ROOT>/src/sfc/\1'

.github/CODE_OF_CONDUCT.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4+
5+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6+
7+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8+
9+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10+
11+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12+
13+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)

.github/CONTRIBUTING.md

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Vue.js Contributing Guide
2+
3+
Hi! I’m really excited that you are interested in contributing to Vue.js. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
4+
5+
- [Code of Conduct](https://github.com/vuejs/vue/blob/dev/.github/CODE_OF_CONDUCT.md)
6+
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
7+
- [Pull Request Guidelines](#pull-request-guidelines)
8+
- [Development Setup](#development-setup)
9+
- [Project Structure](#project-structure)
10+
11+
## Issue Reporting Guidelines
12+
13+
- The issue list of this repo is **exclusively** for bug reports and feature requests. Non-conforming issues will be closed immediately.
14+
15+
- For simple beginner questions, you can get quick answers from [The Gitter chat room](https://gitter.im/vuejs/vue).
16+
17+
- For more complicated questions, you can use [the official forum](http://forum.vuejs.org/) or StackOverflow. Make sure to provide enough information when asking your questions - this makes it easier for others to help you!
18+
19+
- Try to search for your issue, it may have already been answered or even fixed in the development branch.
20+
21+
- Check if the issue is reproducible with the latest stable version of Vue. If you are using a pre-release, please indicate the specific version you are using.
22+
23+
- It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed.
24+
25+
- It is recommended that you make a JSFiddle/JSBin/Codepen to demonstrate your issue. You could start with [this template](http://jsfiddle.net/5sH6A/) that already includes the latest version of Vue.
26+
27+
- For bugs that involves build setups, you can create a reproduction repository with steps in the README.
28+
29+
- If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it.
30+
31+
## Pull Request Guidelines
32+
33+
- The `master` branch is basically just a snapshot of the latest stable release. All development should be done in dedicated branches. **Do not submit PRs against the `master` branch.**
34+
35+
- Checkout a topic branch from the relevant branch, e.g. `dev`, and merge back against that branch.
36+
37+
- Work in the `src` folder and **DO NOT** checkin `dist` in the commits.
38+
39+
- It's OK to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging.
40+
41+
- Make sure `npm test` passes. (see [development setup](#development-setup))
42+
43+
- If adding new feature:
44+
- Add accompanying test case.
45+
- Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it.
46+
47+
- If fixing a bug:
48+
- Provide detailed description of the bug in the PR. Live demo preferred.
49+
- Add appropriate test coverage if applicable.
50+
51+
## Development Setup
52+
53+
You will need [Node.js](http://nodejs.org) **version 6+** and [Java Runtime Environment](http://www.oracle.com/technetwork/java/javase/downloads/index.html) (needed for running Selenium server during e2e tests).
54+
55+
After cloning the repo, run:
56+
57+
``` bash
58+
$ npm install
59+
```
60+
61+
### Commonly used NPM scripts
62+
63+
``` bash
64+
# watch and auto re-build dist/vue.js
65+
$ npm run dev
66+
67+
# watch and auto re-run unit tests in Chrome
68+
$ npm run dev:test
69+
70+
# build all dist files, including npm packages
71+
$ npm run build
72+
73+
# run the full test suite, include linting / type checking
74+
$ npm test
75+
```
76+
77+
There are some other scripts available in the `scripts` section of the `package.json` file.
78+
79+
The default test script will do the following: lint with ESLint -> type check with Flow -> unit tests with coverage -> e2e tests. **Please make sure to have this pass successfully before submitting a PR.** Although the same tests will be run against your PR on the CI server, it is better to have it working locally beforehand.
80+
81+
## Project Structure
82+
83+
- **`build`**: contains build-related configuration files. In most cases you don't need to touch them.
84+
85+
- **`dist`**: contains built files for distribution. Note this directory is only updated when a release happens; they do not reflect the latest changes in development branches.
86+
87+
- **`flow`**: contains type declarations for [Flow](https://flowtype.org/). These declarations are loaded **globally** and you will see them used in type annotations in normal source code.
88+
89+
- **`packages`**: contains `vue-server-renderer` and `vue-template-compiler`, which are distributed as separate NPM packages. They are automatically generated from the source code and always have the same version with the main `vue` package.
90+
91+
- **`test`**: contains all tests. The unit tests are written with [Jasmine](http://jasmine.github.io/2.3/introduction.html) and run with [Karma](http://karma-runner.github.io/0.13/index.html). The e2e tests are written for and run with [Nightwatch.js](http://nightwatchjs.org/).
92+
93+
- **`src`**: contains the source code, obviously. The codebase is written in ES2015 with [Flow](https://flowtype.org/) type annotations.
94+
95+
- **`entries`**: contains entries for different builds and packages.
96+
97+
- **`web-runtime`**: the entry for `dist/vue.common.js`, a.k.a the runtime-only build. It does not include the template to render function compiler, so it does not support the `template` option. **This is set as the `main` field in `package.json` so it is the default export when you import Vue as an NPM package.**
98+
99+
- **`web-runtime-with-compiler`**: the entry for `dist/vue.js`, a.k.a the standalone build. It includes the template to render function compiler. To use this build from the NPM packages, do `import Vue from 'vue/dist/vue'`, or alias `vue` to `vue/dist/vue` in your build tool configuration.
100+
101+
- **`web-compiler.js`**: the entry for the `vue-template-compiler` NPM package.
102+
103+
- **`web-server-renderer.js`**: the entry for the `vue-server-renderer` NPM package.
104+
105+
- **`compiler`**: contains code for the template-to-render-function compiler.
106+
107+
The compiler consists of a parser (converts template strings to element ASTs), an optimizer (detects static trees for vdom render optimization), and a code generator (generate render function code from element ASTs). Note the codegen directly generates code strings from the element AST - it's done this way for smaller code size because the compiler is shipped to the browser in the standalone build.
108+
109+
- **`core`**: contains universal, platform-agnostic runtime code.
110+
111+
The Vue 2.0 core is platform-agnostic - which means code inside `core` should be able to run in any JavaScript environment, be it the browser, Node.js, or an embedded JavaScript runtime in native applications.
112+
113+
- **`observer`**: contains code related to the reactivity system.
114+
115+
- **`vdom`**: contains code related to vdom element creation and patching.
116+
117+
- **`instance`**: contains Vue instance constructor and prototype methods.
118+
119+
- **`global-api`**: as the name suggests.
120+
121+
- **`components`**: universal abstract components. Currently `keep-alive` is the only one.
122+
123+
- **`server`**: contains code related to server-side rendering.
124+
125+
- **`platforms`**: contains platform-specific code.
126+
127+
Each platform module contains three parts: `compiler`, `runtime` and `server`, corresponding to the three directories above. Each part contains platform-specific modules/utilities which are then imported and injected to the core counterparts in platform-specific entry files. For example, the code implementing the logic behind `v-bind:class` is in `platforms/web/runtime/modules/class.js` - which is imported in `entries/web-runtime.js` and used to create the browser-specific vdom patching function.
128+
129+
- **`sfc`**: contains single-file component (`*.vue` files) parsing logic. This is used in the `vue-template-compiler` package.
130+
131+
- **`shared`**: contains utilities shared across the entire codebase.
132+

.github/ISSUE_TEMPLATE.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!--
2+
中文用户请注意:
3+
4+
1. issue 只接受带重现的 bug 报告,请不要用来提问题!不符合要求的 issue 会被直接关闭。
5+
2. 请尽量用英文描述你的 issue,这样能够让尽可能多的人帮到你。
6+
7+
Got a question?
8+
===============
9+
The issue list of this repo is **exclusively** for bug reports and feature requests. For simple questions, please use the following resources:
10+
11+
- Read the docs: http://vuejs.org/guide/
12+
- Watch video tutorials: https://laracasts.com/series/learning-vue-step-by-step
13+
- Ask in the Gitter chat room: https://gitter.im/vuejs/vue
14+
- Ask on the forums: http://forum.vuejs.org/
15+
- Look for/ask questions on stack overflow: https://stackoverflow.com/questions/ask?tags=vue.js
16+
17+
Reporting a bug?
18+
================
19+
- Try to search for your issue, it may have already been answered or even fixed in the development branch.
20+
21+
- Check if the issue is reproducible with the latest stable version of Vue. If you are using a pre-release, please indicate the specific version you are using.
22+
23+
- It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed.
24+
25+
- It is recommended that you make a JSFiddle/JSBin/Codepen to demonstrate your issue. You could start with [this template](http://jsfiddle.net/5sH6A/) that already includes the latest version of Vue.
26+
27+
- For bugs that involves build setups, you can create a reproduction repository with steps in the README.
28+
29+
- If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it.
30+
31+
Have a feature request?
32+
=======================
33+
Remove the template from below and provide thoughtful commentary *and code samples* on what this feature means for your product. What will it allow you to do that you can't do today? How will it make current work-arounds straightforward? What potential bugs and edge cases does it help to avoid? etc. Please keep it product-centric.
34+
-->
35+
36+
<!-- BUG REPORT TEMPLATE -->
37+
### Vue.js version
38+
2.0.0-rc.1
39+
40+
### Reproduction Link
41+
<!-- A minimal JSBin, JSFiddle, Codepen, or a GitHub repository that can reproduce the bug. -->
42+
43+
### Steps to reproduce
44+
45+
### What is Expected?
46+
47+
### What is actually happening?

.github/PULL_REQUEST_TEMPLATE.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!--
2+
Please make sure to read the Pull Request Guidelines:
3+
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
4+
-->

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
.DS_Store
22
node_modules
3-
npm-debug.log
3+
*.log
44
explorations
55
TODOs.md
66
dist/*.gz
77
dist/*.map
88
dist/vue.common.min.js
9-
selenium-debug.log
109
test/e2e/reports
10+
test/e2e/screenshots
1111
coverage

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013-2016 Yuxi Evan You
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

+84-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,87 @@
1-
# vue-next [![CircleCI](https://img.shields.io/circleci/project/vuejs/vue/next.svg?maxAge=2592000)](https://circleci.com/gh/vuejs/vue/tree/next) [![Coverage](https://img.shields.io/codecov/c/github/vuejs/vue/next.svg)](https://codecov.io/github/vuejs/vue?branch=next)
1+
<p align="center"><a href="http://vuejs.org" target="_blank"><img width="100"src="http://vuejs.org/images/logo.png"></a></p>
22

3-
> pre-alpha state, use at your own risk. For the time being, check out the [announcement post](https://medium.com/the-vue-point/announcing-vue-js-2-0-8af1bde7ab9#.jylu9wz4y) and the [feature comparison with 1.0](https://github.com/vuejs/vue/wiki/2.0-features).
3+
<p align="center">
4+
<a href="https://circleci.com/gh/vuejs/vue/tree/master"><img src="https://img.shields.io/circleci/project/vuejs/vue/master.svg" alt="Build Status"></a>
5+
<a href="https://codecov.io/github/vuejs/vue?branch=master"><img src="https://img.shields.io/codecov/c/github/vuejs/vue/dev.svg" alt="Coverage Status"></a>
6+
<a href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/dt/vue.svg" alt="Downloads"></a>
7+
<a href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/v/vue.svg" alt="Version"></a>
8+
<a href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/l/vue.svg" alt="License"></a>
9+
<br>
10+
<a href="https://saucelabs.com/u/vuejs"><img src="https://saucelabs.com/browser-matrix/vuejs.svg" alt="Sauce Test Status"></a>
11+
</p>
412

5-
### Build
13+
## Supporting Vue.js
614

7-
``` bash
8-
npm install
9-
npm run build
10-
```
15+
Vue.js is an MIT-licensed open source project. Its ongoing development is made possible thanks to the support by these awesome [backers](https://github.com/vuejs/vue/blob/dev/backers.md). If you'd like to join them, check out [Vue.js' Patreon campaign](https://www.patreon.com/evanyou).
16+
17+
**Special thanks to the generous sponsorship by:**
18+
19+
<a href="https://strikingly.com/s/careers?utm_source=v">
20+
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/strikingly.png">
21+
</a>
22+
23+
<a href="http://www.itunescn.com/">
24+
<img width="160px" src="https://www.zymmm.com/content/images/2016/05/itunescn-logo-4.png">
25+
</a>
26+
27+
<a href="https://jsfiddle.net/">
28+
<img width="160px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/jsfiddle.png">
29+
</a>
30+
31+
<a href="https://laravel.com/">
32+
<img width="160px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/laravel.png">
33+
</a>
34+
35+
<a href="https://chaitin.cn/">
36+
<img width="160px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/chaitin.png">
37+
</a>
38+
39+
<a href="https://htmlburger.com/">
40+
<img width="160px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/htmlburger.png">
41+
</a>
42+
43+
<a href="https://starter.someline.com/">
44+
<img width="160px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/someline.png">
45+
</a>
46+
47+
<a href="http://gold.xitu.io/?utm_source=vuejs&utm_medium=image&utm_content=juejin&utm_campaign=q3_website">
48+
<img width="120px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/juejin.png">
49+
</a>
50+
51+
## Intro
52+
53+
Vue.js is a library for building interactive web interfaces. It provides data-reactive components with a simple and flexible API. Core features include:
54+
55+
- [Dead simple, unobtrusive reactivity using plain JavaScript objects.](http://vuejs.org/guide/overview.html#Reactive-Data-Binding)
56+
- [Component-oriented development style with tooling support](http://vuejs.org/guide/overview.html#Component-System)
57+
- Lean and extensible core
58+
- [Flexible transition effect system](http://vuejs.org/guide/transitions.html)
59+
- Fast without the need for complex optimization
60+
61+
Note that Vue.js only supports [ES5-compliant browsers](http://kangax.github.io/compat-table/es5/) (IE8 and below are not supported). To check out live examples and docs, visit [vuejs.org](http://vuejs.org).
62+
63+
## Questions
64+
65+
For questions and support please use the [Gitter chat room](https://gitter.im/vuejs/vue) or [the official forum](http://forum.vuejs.org). The issue list of this repo is **exclusively** for bug reports and feature requests.
66+
67+
## Issues
68+
69+
Please make sure to read the [Issue Reporting Checklist](https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#issue-reporting-guidelines) before opening an issue. Issues not conforming to the guidelines may be closed immediately.
70+
71+
## Contribution
72+
73+
Please make sure to read the [Contributing Guide](https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md) before making a pull request. If you have a Vue-related project/component/tool, add it with a pull-request to [this curated list](https://github.com/vuejs/awesome-vue)!
74+
75+
## Changelog
76+
77+
Details changes for each release are documented in the [release notes](https://github.com/vuejs/vue/releases).
78+
79+
## Stay In Touch
80+
81+
- For latest releases and announcements, follow on Twitter: [@vuejs](https://twitter.com/vuejs)
82+
83+
## License
84+
85+
[MIT](http://opensource.org/licenses/MIT)
86+
87+
Copyright (c) 2013-2016 Evan You

benchmarks/dbmon/app.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Vue.config.preserveWhitespace = false
2-
31
var app = new Vue({
42
el: '#app',
53
data: {

0 commit comments

Comments
 (0)