Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0a98cb9

Browse files
authoredAug 14, 2017
Merge pull request vuejs#106 from Haeresis/consistency
[Doc EN] — Several files — Consistency changes
2 parents d9802e6 + babacc3 commit 0a98cb9

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed
 

‎en/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Vue.js Server-Side Rendering Guide
22

33
> **Note:** this guide requires the following minimum versions of Vue and supporting libraries:
4-
> - vue & vue-server-renderer >= 2.3.0
5-
> - vue-router >= 2.5.0
6-
> - vue-loader >= 12.0.0 & vue-style-loader >= 3.0.0
4+
> - vue & vue-server-renderer 2.3.0+
5+
> - vue-router 2.5.0+
6+
> - vue-loader 12.0.0+ & vue-style-loader 3.0.0+
77
88
> If you have previously used Vue 2.2 with SSR, you will notice that the recommended code structure is now [a bit different](./structure.md) (with the new [runInNewContext](./api.md#runinnewcontext) option set to `false`). Your existing app should continue to work, but it's recommended to migrate to the new recommendations.
99

‎en/api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ See [Introducing the Server Bundle](./bundle-renderer.md) and [Build Configurati
151151
- 2.2.0+
152152
- only used in `createBundleRenderer`
153153

154-
Explicitly declare the base directory for the server bundle to resolve `node_modules` dependencies from. This is only needed if your generated bundle file is placed in a different location from where the externalized NPM dependencies are installed, or your `vue-server-renderer` is npm-linked into your current project.
154+
Explicitly declare the base directory for the server bundle to resolve `node_modules` dependencies from. This is only needed if your generated bundle file is placed in a different location from where the externalized NPM dependencies are installed, or your `vue-server-renderer` is NPM-linked into your current project.
155155

156156
- #### `cache`
157157

@@ -177,7 +177,7 @@ See [Introducing the Server Bundle](./bundle-renderer.md) and [Build Configurati
177177
})
178178
```
179179

180-
Note that the cache object should at least implement `get` and `set`. In addition, `get` and `has` can be optionally async if they accept a second argument as callback. This allows the cache to make use of async APIs, e.g. a redis client:
180+
Note that the cache object should at least implement `get` and `set`. In addition, `get` and `has` can be optionally async if they accept a second argument as callback. This allows the cache to make use of async APIs, e.g. a Redis client:
181181

182182
``` js
183183
const renderer = createRenderer({

‎en/caching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default {
6767
}
6868
```
6969

70-
Note that cache-able component **must also define a unique "name" option**. With a unique name, the cache key is thus per-component: you don't need to worry about two components returning the same key.
70+
Note that cache-able component **must also define a unique `name` option**. With a unique name, the cache key is thus per-component: you don't need to worry about two components returning the same key.
7171

7272
The key returned from `serverCacheKey` should contain sufficient information to represent the shape of the render result. The above is a good implementation if the render result is solely determined by `props.item.id`. However, if the item with the same id may change over time, or if render result also relies on another prop, then you need to modify your `getCacheKey` implementation to take those other variables into account.
7373

‎en/css.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ More importantly, `vue-style-loader`, the loader used internally by `vue-loader`
2222

2323
## Enabling CSS Extraction
2424

25-
To extract CSS from `*.vue` files, use `vue-loader`'s `extractCSS` option (requires `vue-loader>=12.0.0`):
25+
To extract CSS from `*.vue` files, use `vue-loader`'s `extractCSS` option (requires `vue-loader` 12.0.0+):
2626

2727
``` js
2828
// webpack.config.js

‎en/head.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Similar to asset injection, head management follows the same idea: we can dynamically attach data to the render `context` in a component's lifecycle, and then interpolate those data in `template`.
44

5-
> In version >=2.3.2, you can directly access the SSR context in a component as `this.$ssrContext`. In older versions you'd have to manually inject the SSR context by passing it to `createApp()` and expose it on the root instance's `$options` - child components can then access it via `this.$root.$options.ssrContext`.
5+
> In version 2.3.2+, you can directly access the SSR context in a component as `this.$ssrContext`. In older versions you'd have to manually inject the SSR context by passing it to `createApp()` and expose it on the root instance's `$options` - child components can then access it via `this.$root.$options.ssrContext`.
66
77
We can write a simple mixin to perform title management:
88

@@ -38,7 +38,7 @@ const clientTitleMixin = {
3838
}
3939
}
4040

41-
// VUE_ENV can be injected with webpack.DefinePlugin
41+
// `VUE_ENV` can be injected with `webpack.DefinePlugin`
4242
export default process.env.VUE_ENV === 'server'
4343
? serverTitleMixin
4444
: clientTitleMixin
@@ -66,7 +66,7 @@ export default {
6666
}
6767
```
6868

69-
And inside the `template` passed to bundle renderer:
69+
And inside the template passed to bundle renderer:
7070

7171
``` html
7272
<html>

0 commit comments

Comments
 (0)
Please sign in to comment.