Skip to content

Commit fb8d5b5

Browse files
committed
merge
2 parents cb8a7e7 + 9831b40 commit fb8d5b5

File tree

181 files changed

+18624
-17447
lines changed

Some content is hidden

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

181 files changed

+18624
-17447
lines changed

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
insert_final_newline = false
15+
trim_trailing_whitespace = false

.eslintrc

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{
22
"root": true,
3-
"parser": "babel-eslint",
4-
"extends": "vue",
5-
"plugins": ["flowtype"],
3+
"plugins": [
4+
"flowtype"
5+
],
6+
"extends": [
7+
"plugin:vue-libs/recommended",
8+
"plugin:flowtype/recommended"
9+
],
610
"globals": {
711
"__WEEX__": true
8-
},
9-
"rules": {
10-
"no-useless-escape": 0,
11-
"flowtype/define-flow-type": 1,
12-
"flowtype/use-flow-type": 1
1312
}
1413
}

.github/CONTRIBUTING.md

+9-11
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,16 @@ The default test script will do the following: lint with ESLint -> type check wi
7373

7474
## Project Structure
7575

76-
- **`build`**: contains build-related configuration files. In most cases you don't need to touch them.
76+
- **`build`**: contains build-related configuration files. In most cases you don't need to touch them. However, it would be helpful to familiarize yourself with the following files:
77+
78+
- `build/alias.js`: module import aliases used across all source code and tests.
79+
80+
- `build/config.js`: contains the build configurations for all files found in `dist/`. Check this file if you want to find out the entry source file for a dist file.
7781

7882
- **`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.
7983

84+
See [dist/README.md](https://github.com/vuejs/vue/blob/dev/dist/README.md) for more details on dist files.
85+
8086
- **`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.
8187

8288
- **`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.
@@ -85,16 +91,6 @@ The default test script will do the following: lint with ESLint -> type check wi
8591

8692
- **`src`**: contains the source code, obviously. The codebase is written in ES2015 with [Flow](https://flowtype.org/) type annotations.
8793

88-
- **`entries`**: contains entries for different builds and packages.
89-
90-
- **`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.**
91-
92-
- **`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.
93-
94-
- **`web-compiler.js`**: the entry for the `vue-template-compiler` NPM package.
95-
96-
- **`web-server-renderer.js`**: the entry for the `vue-server-renderer` NPM package.
97-
9894
- **`compiler`**: contains code for the template-to-render-function compiler.
9995

10096
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.
@@ -117,6 +113,8 @@ The default test script will do the following: lint with ESLint -> type check wi
117113

118114
- **`platforms`**: contains platform-specific code.
119115

116+
Entry files for dist builds are located in their respective platform directory.
117+
120118
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.
121119

122120
- **`sfc`**: contains single-file component (`*.vue` files) parsing logic. This is used in the `vue-template-compiler` package.

.github/ISSUE_TEMPLATE.md

+3
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ IMPORTANT: Please use the following link to create a new issue:
44
https://new-issue.vuejs.org/
55
66
If your issue was not created using the app above, it will be closed immediately.
7+
8+
中文用户请注意:
9+
请使用上面的链接来创建新的 issue。如果不是用上述工具创建的 issue 会被自动关闭。
710
-->

BACKERS.md

+44-28
Original file line numberDiff line numberDiff line change
@@ -10,91 +10,95 @@ You can join them in supporting Vue.js development by [pledging on Patreon](htt
1010

1111
---
1212

13+
### $1000
14+
15+
<a href="https://www.upyun.com/?utm_source=vue&utm_medium=ad&utm_content=github">
16+
<img width="400px" src="https://raw.githubusercontent.com/vuejs/cn.vuejs.org/master/themes/vue/source/images/upyun-large.png">
17+
</a>
18+
19+
---
20+
1321
### $500
1422

1523
<a href="https://deepstreamhub.com">
1624
<img width="260px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/deepstream.png">
1725
</a>
18-
26+
<br><br>
1927
<a href="https://jsfiddle.net/">
2028
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/jsfiddle.png">
2129
</a>
22-
30+
<br><br>
2331
<a href="https://laravel.com">
2432
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/laravel.png">
2533
</a>
26-
34+
<br><br>
2735
<a href="https://chaitin.cn">
2836
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/chaitin.png">
2937
</a>
30-
38+
<br><br>
3139
<a href="https://htmlburger.com/">
3240
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/htmlburger.png">
3341
</a>
34-
42+
<br><br>
3543
<a href="https://starter.someline.com/">
3644
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/someline.png">
3745
</a>
38-
46+
<br><br>
3947
<a href="http://monterail.com/" target="_blank">
4048
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/monterail.png">
4149
</a>
42-
50+
<br><br>
4351
<a href="https://www.trisoft.ro/" target="_blank">
4452
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/trisoft.png">
4553
</a>
46-
54+
<br><br>
4755
<a href="https://www.2mhost.com/" target="_blank">
4856
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/2mhost.png">
4957
</a>
50-
58+
<br><br>
5159
<a href="https://vuejsjob.com/?ref=vuejs" target="_blank">
5260
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vuejobs.png">
5361
</a>
54-
62+
<br><br>
5563
<a href="https://leanpub.com/vuejs2" target="_blank">
5664
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/tmvuejs2.png">
5765
</a>
58-
59-
<a href="https://fancygrid.com" target="_blank">
60-
<img width="240px" src="http://fancygrid.com/logo/logo.png">
66+
<br><br>
67+
<a href="https://famebroker.com" target="_blank">
68+
<img width="260px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/famebroker.png">
6169
</a>
62-
70+
<br><br>
6371
<a href="https://component.io/" target="_blank">
6472
<img width="260px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/component_io.png">
6573
</a>
6674

67-
#### Sacha Kupambana
68-
69-
---
70-
71-
### $250
72-
73-
[It could be you!](https://www.patreon.com/bePatron?u=2341390)
74-
7575
---
7676

7777
### $100
7878

7979
<a href="http://tighten.co/">
8080
<img width="240px" src="http://i.imgur.com/T7fQYLT.png">
8181
</a>
82-
82+
<br><br>
8383
<a href="http://invoicemachine.com/">
8484
<img width="220px" src="http://assets.invoicemachine.com/images/flat_logo.png">
8585
</a>
86-
86+
<br><br>
8787
<a href="https://alligator.io">
8888
<img width="240px" src="https://alligator.io/images/alligator-logo.svg">
8989
</a>
90-
90+
<br><br>
9191
<a href="https://monei.net/">
9292
<img width="200px" src="http://i.imgur.com/JUSjHAi.png">
9393
</a>
94-
94+
<br><br>
9595
<a href="https://www.accelebrate.com/">
9696
<img width="220px" src="https://www.accelebrate.com/assets/images/[email protected]">
9797
</a>
98+
<br><br>
99+
<a href="https://www.waterfall.com">
100+
<img width="200px" src="https://waterfall.com/waterfall_logo_large.png">
101+
</a>
98102

99103
---
100104

@@ -110,7 +114,6 @@ You can join them in supporting Vue.js development by [pledging on Patreon](htt
110114
- Wasim Khamlichi
111115
- errorrik
112116
- Alex Balashov
113-
- Cheng-Wei Chien
114117

115118
---
116119

@@ -155,7 +158,6 @@ You can join them in supporting Vue.js development by [pledging on Patreon](htt
155158
- Anders
156159
- Dexter Miguel
157160
- Stephen Michael Hartley
158-
- TJ Fogarty
159161
- Wen-Tien Chang
160162
- Ole Støvern
161163
- Valerian Cure
@@ -247,3 +249,17 @@ You can join them in supporting Vue.js development by [pledging on Patreon](htt
247249
- Dan Barrett
248250
- Zoran Knezevic
249251
- Charles Beaumont
252+
- Jonathan Kent
253+
- James Simpson
254+
- Pascal Germain
255+
- Pierre Vanhulst
256+
- Vincent Gabriel
257+
- Kyovo Digaw
258+
- devneko
259+
- Cheng-Wei Chien
260+
- Michael Mazurczak
261+
- Daniel
262+
- Chris Anderson
263+
- Jon Hobbs-Smith
264+
- Chez Tschetter
265+
- Akiho Nagao

README.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<p align="center">
44
<a href="https://circleci.com/gh/vuejs/vue/tree/dev"><img src="https://img.shields.io/circleci/project/vuejs/vue/dev.svg" alt="Build Status"></a>
55
<a href="https://codecov.io/github/vuejs/vue?branch=dev"><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>
6+
<a href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/dm/vue.svg" alt="Downloads"></a>
77
<a href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/v/vue.svg" alt="Version"></a>
88
<a href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/l/vue.svg" alt="License"></a>
99
<br>
@@ -21,6 +21,10 @@ Vue.js is an MIT-licensed open source project. Its ongoing development is made p
2121
<img width="240px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/stdlib.png">
2222
</a>
2323
<br><br>
24+
<a href="https://www.upyun.com/?utm_source=vue&utm_medium=ad&utm_content=github">
25+
<img width="160px" src="https://raw.githubusercontent.com/vuejs/cn.vuejs.org/master/themes/vue/source/images/upyun-small.png">
26+
</a>
27+
<br><br>
2428
<a href="https://deepstreamhub.com" target="_blank">
2529
<img width="140px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/deepstream.png">
2630
</a>
@@ -65,8 +69,8 @@ Vue.js is an MIT-licensed open source project. Its ongoing development is made p
6569
<img width="120px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/tmvuejs2.png">
6670
</a>
6771
<br><br>
68-
<a href="https://fancygrid.com" target="_blank">
69-
<img width="120px" src="http://fancygrid.com/logo/logo.png">
72+
<a href="https://famebroker.com" target="_blank">
73+
<img width="130px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/famebroker.png">
7074
</a>
7175
<br><br>
7276
<a href="https://component.io/" target="_blank">
@@ -78,13 +82,17 @@ Vue.js is an MIT-licensed open source project. Its ongoing development is made p
7882

7983
Vue.js is a library for building interactive web interfaces. It provides data-reactive components with a simple and flexible API. Core features include:
8084

81-
- [Declarative rendering with a plain JavaScript object based reactivity system.](https://vuejs.org/guide/index.html#Declarative-Rendering)
85+
- [Declarative rendering with a plain JavaScript object based reactivity system](https://vuejs.org/guide/index.html#Declarative-Rendering)
8286
- [Component-oriented development style with tooling support](https://vuejs.org/guide/index.html#Composing-with-Components)
8387
- Lean and extensible core
8488
- [Flexible transition effect system](https://vuejs.org/guide/transitions.html)
8589
- Fast without the need for complex optimization
8690

87-
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](https://vuejs.org).
91+
Note that Vue.js only supports [ES5-compliant browsers](http://kangax.github.io/compat-table/es5/) (IE8 and below are not supported).
92+
93+
## Documentation
94+
95+
To check out live examples and docs, visit [vuejs.org](https://vuejs.org).
8896

8997
## Questions
9098

@@ -104,7 +112,7 @@ Details changes for each release are documented in the [release notes](https://g
104112

105113
## Stay In Touch
106114

107-
- For latest releases and announcements, follow on Twitter: [@vuejs](https://twitter.com/vuejs)
115+
For the latest releases and announcements, follow on Twitter: [@vuejs](https://twitter.com/vuejs)
108116

109117
## License
110118

benchmarks/ssr/renderToString.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ console.log('--- renderToString --- ')
1111
const self = (global || root)
1212
self.s = self.performance.now()
1313

14-
renderToString(new Vue(gridComponent), () => {
14+
renderToString(new Vue(gridComponent), (err, res) => {
15+
if (err) throw err
16+
// console.log(res)
1517
console.log('Complete time: ' + (self.performance.now() - self.s).toFixed(2) + 'ms')
1618
console.log()
1719
})

build/alias.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('path')
22

33
module.exports = {
4-
vue: path.resolve(__dirname, '../src/entries/web-runtime-with-compiler'),
4+
vue: path.resolve(__dirname, '../src/platforms/web/entry-runtime-with-compiler'),
55
compiler: path.resolve(__dirname, '../src/compiler'),
66
core: path.resolve(__dirname, '../src/core'),
77
shared: path.resolve(__dirname, '../src/shared'),

build/build.js

-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ function buildEntry (config) {
4646
const code = bundle.generate(config).code
4747
if (isProd) {
4848
var minified = (config.banner ? config.banner + '\n' : '') + uglify.minify(code, {
49-
fromString: true,
5049
output: {
51-
screw_ie8: true,
5250
ascii_only: true
5351
},
5452
compress: {

0 commit comments

Comments
 (0)