You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/guide/comparison.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -213,7 +213,7 @@ React is renowned for its steep learning curve. Before you can really get starte
213
213
While Vue scales up just as well as, if not better than React, it also scales down just as well as jQuery. That's right - all you have to do is drop a single script tag into a page:
Then you can start writing Vue code and even ship the minified version to production without feeling guilty or having to worry about performance problems.
@@ -268,7 +268,7 @@ We have a separate section for Angular 2 because it really is a completely new f
268
268
269
269
While Angular 1 could be used for smaller applications, Angular 2 has shifted focus to best facilitate large enterprise applications. As part of this, it almost requires TypeScript, which can be very useful for developers that desire the type safety of languages such as Java and C#.
270
270
271
-
Vue is also well-suited to [enterprise environments](https://github.com/vuejs/awesome-vue#enterprise-usage) and can even be used with TypeScript via our [official typings](https://github.com/vuejs/vue/tree/next/types) and [user-contributed decorators](https://github.com/itsFrank/vue-typescript), though it's definitely optional in our case.
271
+
Vue is also well-suited to [enterprise environments](https://github.com/vuejs/awesome-vue#enterprise-usage) and can even be used with TypeScript via our [official typings](https://github.com/vuejs/vue/tree/dev/types) and [user-contributed decorators](https://github.com/itsFrank/vue-typescript), though it's definitely optional in our case.
Copy file name to clipboardExpand all lines: src/guide/index.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -332,7 +332,7 @@ You may have noticed that Vue components are very similar to **Custom Elements**
332
332
333
333
1. The Web Components Spec is still in draft status, and is not natively implemented in every browser. In comparison, Vue components don't require any polyfills and work consistently in all supported browsers (IE9 and above). When needed, Vue components can also be wrapped inside a native custom element.
334
334
335
-
2. Vue components provide important features that are not available in plain custom elements, most notably cross-component data flow, custom event communication and built tool integrations.
335
+
2. Vue components provide important features that are not available in plain custom elements, most notably cross-component data flow, custom event communication and build tool integrations.
Copy file name to clipboardExpand all lines: src/guide/installation.md
+25-22Lines changed: 25 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
title: Installation
3
3
type: guide
4
4
order: 1
5
-
vue_version: 2.0.0-rc.6
6
-
dev_size: "184"
7
-
min_size: "64"
8
-
gz_size: "22"
5
+
vue_version: 2.0.0-rc.8
6
+
dev_size: "183.80"
7
+
min_size: "61.54"
8
+
gz_size: "22.53"
9
9
---
10
10
11
11
### Compatibility Note
@@ -30,42 +30,46 @@ Simply download and include with a script tag. `Vue` will be registered as a glo
30
30
31
31
### CDN
32
32
33
-
Available on [jsdelivr](//cdn.jsdelivr.net/vue/{{vue_version}}/vue.min.js) or [cdnjs](//cdnjs.cloudflare.com/ajax/libs/vue/{{vue_version}}/vue.min.js) (takes some time to sync so the latest version might not be available yet).
33
+
Recommended: [unpkg](https://unpkg.com/vue), which will reflect the latest version as soon as it is published to npm. You can also browse the source of the npm package at [unpkg.com/vue/](https://unpkg.com/vue/).
34
34
35
-
Also available on [unpkg](https://unpkg.com/vue/dist/vue.min.js), which will reflect the latest version as soon as it is published to npm. You can also browse the source of the npm package at [unpkg.com/vue/](https://unpkg.com/vue/).
36
-
37
-
### CSP environments
38
-
39
-
Some environments, such as Google Chrome Apps, enforce Content Security Policy (CSP), which prohibits the use of `new Function()` for evaluating expressions. The standalone build depends on this feature to compile templates, so is unusable in these environments.
40
-
41
-
There _is_ a solution however. When using Vue in a build system with [Webpack + vue-loader](https://github.com/vuejs-templates/webpack-simple-2.0) or [Browserify + vueify](https://github.com/vuejs-templates/browserify-simple-2.0), your templates will be precompiled into `render` functions which work perfectly in CSP environments.
35
+
Also available on [jsdelivr](//cdn.jsdelivr.net/vue/{{vue_version}}/vue.js) or [cdnjs](//cdnjs.cloudflare.com/ajax/libs/vue/{{vue_version}}/vue.js), but these two services take some time to sync so the latest release may not be available yet.
42
36
43
37
## NPM
44
38
45
39
NPM is the recommended installation method when building large scale applications with Vue. It pairs nicely with module bundlers such as [Webpack](http://webpack.github.io/) or [Browserify](http://browserify.org/). Vue also provides accompanying tools for authoring [Single File Components](application.html#Single-File-Components).
46
40
47
41
```bash
48
42
# latest stable
49
-
$ npm install vue@next
43
+
$ npm install vue
50
44
```
51
45
52
-
### Note on NPM Builds
46
+
### Standalone vs. Runtime-only Build
47
+
48
+
There are two builds available, the standalone build and the runtime-only build.
53
49
54
-
Because Single File Components pre-compile the templates into render functions at build time, the default export of the `vue` NPM package is the **runtime-only build**, which does not support the `template` option. If you still wish to use the `template` option, you will need to configure your bundler to alias `vue` to the standalone build.
50
+
- The standalone build includes the compiler and supports the `template` option.
55
51
56
-
With webpack, add the following alias to your webpack config:
52
+
- The runtime-only build does not include the template compiler, and does not support the `template` option. You can only use the `render` option when using the runtime-only build, but it works with single-file components, because single-file components' templates are pre-compiled into `render` functions during the build step. The runtime-only build is roughly 30% lighter-weight than the standalone build, weighing only 16kb min+gzip.
53
+
54
+
By default, the NPM package exports the standalone build. To use the runtime-only build, add the following alias to your webpack config:
57
55
58
56
```js
59
57
resolve: {
60
58
alias: {
61
-
vue:'vue/dist/vue.js'
59
+
vue:'vue/dist/vue.common.js'
62
60
}
63
61
}
64
62
```
65
63
66
-
For Browserify, you can use [aliasify](https://github.com/benbria/aliasify) for the same effect.
64
+
For Browserify, you can use [aliasify](https://github.com/benbria/aliasify) to achieve the same.
65
+
66
+
<pclass="tip">Do NOT do `import Vue from 'vue/dist/vue.common.js'` - since some tools or 3rd party libraries may import vue as well, this may cause the app to load both the runtime and standalone builds at the same time and lead to errors.</p>
67
+
68
+
### CSP environments
69
+
70
+
Some environments, such as Google Chrome Apps, enforce Content Security Policy (CSP), which prohibits the use of `new Function()` for evaluating expressions. The standalone build depends on this feature to compile templates, so is unusable in these environments.
67
71
68
-
<pclass="tip">Do NOT do `import Vue from 'vue/dist/vue'` - since some tools or 3rd party libraries may import vue as well, this may cause the app to load both the runtime and standalone builds at the same time and lead to errors.</p>
72
+
On the other hand, the runtime-only build is fully CSP-compliant. When using the runtime-only build with [Webpack + vue-loader](https://github.com/vuejs-templates/webpack-simple-2.0) or [Browserify + vueify](https://github.com/vuejs-templates/browserify-simple-2.0), your templates will be precompiled into `render` functions which work perfectly in CSP environments.
69
73
70
74
## CLI
71
75
@@ -84,12 +88,11 @@ $ npm run dev
84
88
85
89
## Dev Build
86
90
87
-
**Important**: the CommonJS bundle distributed on NPM (`vue.common.js`) is only checkedin during releases on the `next` branch. To use Vue from the latest source code on GitHub, you will have to build it yourself!
91
+
**Important**: the built files in GitHub's `/dist` folder are only checked-in during releases. To use Vue from the latest source code on GitHub, you will have to build it yourself!
There are two builds available, the standalone build and the runtime-only build.
106
+
107
+
- The standalone build includes the compiler and supports the `template` option.
108
+
109
+
- The runtime-only build does not include the template compiler, and does not support the `template` option. You can only use the `render` option when using the runtime-only build, but it works with single-file components, because single-file components' templates are pre-compiled into `render` functions during the build step. The runtime-only build is roughly 30% lighter-weight than the standalone build, weighing only 16kb min+gzip.
110
+
111
+
By default, the NPM package exports the standalone build. To use the runtime-only build, add the following alias to your webpack config:
112
+
113
+
```js
114
+
resolve: {
115
+
alias: {
116
+
vue:'vue/dist/vue.common.js'
117
+
}
118
+
}
119
+
```
120
+
121
+
For Browserify, you can use [aliasify](https://github.com/benbria/aliasify) to achieve the same.
122
+
123
+
<pclass="tip">Do NOT do `import Vue from 'vue/dist/vue.common.js'` - since some tools or 3rd party libraries may import vue as well, this may cause the app to load both the runtime and standalone builds at the same time and lead to errors.</p>
Copy file name to clipboardExpand all lines: src/guide/state-management.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ order: 21
6
6
7
7
## Official Flux-Like Implementation
8
8
9
-
Large applications can often grow in complexity, due to multiple pieces of state scattered across many components and the interactions between them. To solve this problem, Vue offers [vuex](https://github.com/vuejs/vuex/tree/next): our own Elm-inspired state management library. It even integrates into [vue-devtools](https://github.com/vuejs/vue-devtools), providing zero-setup access to time travel.
9
+
Large applications can often grow in complexity, due to multiple pieces of state scattered across many components and the interactions between them. To solve this problem, Vue offers [vuex](https://github.com/vuejs/vuex): our own Elm-inspired state management library. It even integrates into [vue-devtools](https://github.com/vuejs/vue-devtools), providing zero-setup access to time travel.
10
10
11
11
### Information for React Developers
12
12
@@ -75,4 +75,4 @@ var vmB = new Vue({
75
75
76
76
As we continue developing the convention where components are never allowed to directly mutate state that belongs to a store, but should instead dispatch events that notify the store to perform actions, we eventually arrive at the [Flux](https://facebook.github.io/flux/) architecture. The benefit of this convention is we can record all state mutations happening to the store and implement advanced debugging helpers such as mutation logs, snapshots, and history re-rolls / time travel.
77
77
78
-
This brings us full circle back to [vuex](https://github.com/vuejs/vuex/tree/next), so if you've read this far it's probably time to try it out!
78
+
This brings us full circle back to [vuex](https://github.com/vuejs/vuex), so if you've read this far it's probably time to try it out!
0 commit comments