From 9bff4e052ec410f086d57371e51ed92c73be317e Mon Sep 17 00:00:00 2001 From: Bruno Lesieur Date: Sat, 27 May 2017 15:25:22 +0200 Subject: [PATCH 1/5] Consitency accross all documentation Signed-off-by: Bruno Lesieur --- docs/en/advanced/data-fetching.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/advanced/data-fetching.md b/docs/en/advanced/data-fetching.md index 1bd472153..3bb8ae9d9 100644 --- a/docs/en/advanced/data-fetching.md +++ b/docs/en/advanced/data-fetching.md @@ -55,7 +55,7 @@ export default { fetchData () { this.error = this.post = null this.loading = true - // replace getPost with your data fetching util / API wrapper + // replace `getPost` with your data fetching util / API wrapper getPost(this.$route.params.id, (err, post) => { this.loading = false if (err) { From 434b764bc81700552a02a158125ecf1c96941107 Mon Sep 17 00:00:00 2001 From: Bruno Lesieur Date: Sat, 27 May 2017 15:50:37 +0200 Subject: [PATCH 2/5] `lazy-loading.md` consitency Signed-off-by: Bruno Lesieur --- docs/en/advanced/lazy-loading.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/advanced/lazy-loading.md b/docs/en/advanced/lazy-loading.md index 949e9d912..5ea1b055f 100644 --- a/docs/en/advanced/lazy-loading.md +++ b/docs/en/advanced/lazy-loading.md @@ -2,14 +2,14 @@ When building apps with a bundler, the JavaScript bundle can become quite large, and thus affect the page load time. It would be more efficient if we can split each route's components into a separate chunk, and only load them when the route is visited. -Combining Vue's [async component feature](http://vuejs.org/guide/components.html#Async-Components) and Webpack's [code splitting feature](https://webpack.js.org/guides/code-splitting-require/), it's trivially easy to +Combining Vue's [async component feature](http://vuejs.org/guide/components.html#Async-Components) and webpack's [code splitting feature](https://webpack.js.org/guides/code-splitting-require/), it's trivially easy to lazy-load route components. All we need to do is define our route components as async components: ``` js const Foo = resolve => { - // require.ensure is Webpack's special syntax for a code-split point. + // `require.ensure` is webpack's special syntax for a code-split point. require.ensure(['./Foo.vue'], () => { resolve(require('./Foo.vue')) }) @@ -42,4 +42,4 @@ const Bar = r => require.ensure([], () => r(require('./Bar.vue')), 'group-foo') const Baz = r => require.ensure([], () => r(require('./Baz.vue')), 'group-foo') ``` -Webpack will group any async module with the same chunk name into the same async chunk - this also means we don't need to explicitly list dependencies for `require.ensure` anymore (thus passing an empty array). +webpack will group any async module with the same chunk name into the same async chunk - this also means we don't need to explicitly list dependencies for `require.ensure` anymore (thus passing an empty array). From fe2fcf2df913b1ffa966d9fa4714218b1d0fa1c1 Mon Sep 17 00:00:00 2001 From: Bruno Lesieur Date: Sat, 27 May 2017 15:59:04 +0200 Subject: [PATCH 3/5] Better consitency for transitions.md Signed-off-by: Bruno Lesieur --- docs/en/advanced/transitions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/advanced/transitions.md b/docs/en/advanced/transitions.md index d6595b23b..495f6bee2 100644 --- a/docs/en/advanced/transitions.md +++ b/docs/en/advanced/transitions.md @@ -45,7 +45,7 @@ It is also possible to determine the transition to use dynamically based on the ``` js // then, in the parent component, -// watch the $route to determine the transition to use +// watch the `$route` to determine the transition to use watch: { '$route' (to, from) { const toDepth = to.path.split('/').length From 64c936ee88118871b83c4b535e130b81ed0ab15c Mon Sep 17 00:00:00 2001 From: Bruno Lesieur Date: Sat, 27 May 2017 16:51:07 +0200 Subject: [PATCH 4/5] Better consistency for router-link.md Signed-off-by: Bruno Lesieur --- docs/en/api/router-link.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/api/router-link.md b/docs/en/api/router-link.md index ff5423de9..82c49770a 100644 --- a/docs/en/api/router-link.md +++ b/docs/en/api/router-link.md @@ -26,10 +26,10 @@ Home - + Home - + Home @@ -38,7 +38,7 @@ User - + Register ``` @@ -103,7 +103,7 @@ One consequence of this is that `` will be active for every route! To force the link into "exact match mode", use the `exact` prop: ``` html - + ``` From c999508865b03d4e18113555cde1814c0a0eb3b1 Mon Sep 17 00:00:00 2001 From: Bruno Lesieur Date: Sat, 27 May 2017 17:18:03 +0200 Subject: [PATCH 5/5] Better consitency for route-object.md Signed-off-by: Bruno Lesieur --- docs/en/api/route-object.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/api/route-object.md b/docs/en/api/route-object.md index 61590f724..70abb4f2c 100644 --- a/docs/en/api/route-object.md +++ b/docs/en/api/route-object.md @@ -16,7 +16,7 @@ The route object can be found in multiple places: ``` js router.beforeEach((to, from, next) => { - // to and from are both route objects + // `to` and `from` are both route objects }) ``` @@ -25,7 +25,7 @@ The route object can be found in multiple places: ``` js const router = new VueRouter({ scrollBehavior (to, from, savedPosition) { - // to and from are both route objects + // `to` and `from` are both route objects } }) ```