Skip to content

Commit 2f6dbef

Browse files
committed
brush up tooling section with redirects to CLI
1 parent eb2f374 commit 2f6dbef

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

Diff for: src/v2/guide/deployment.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
title: Production Deployment
33
type: guide
4-
order: 401
4+
order: 404
55
---
66

7+
> Most of the tips below are enabled by default if you are using [Vue CLI](https://cli.vuejs.org). This section is only relevant if you are using a custom build setup.
8+
79
## Turn on Production Mode
810

911
During development, Vue provides a lot of warnings to help you with common errors and pitfalls. However, these warning strings become useless in production and bloat your app's payload size. In addition, some of these warning checks have small runtime costs that can be avoided in production mode.
@@ -41,6 +43,7 @@ module.exports = {
4143
]
4244
}
4345
```
46+
4447
#### Browserify
4548

4649
- Run your bundling command with the actual `NODE_ENV` environment variable set to `"production"`. This tells `vueify` to avoid including hot-reload and development related code.

Diff for: src/v2/guide/single-file-components.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Single File Components
33
type: guide
4-
order: 402
4+
order: 401
55
---
66

77
## Introduction
@@ -64,8 +64,8 @@ With `.vue` components, we're entering the realm of advanced JavaScript applicat
6464

6565
After you've taken a day to dive into these resources, we recommend checking out [Vue CLI 3](https://cli.vuejs.org/). Follow the instructions and you should have a Vue project with `.vue` components, ES2015, Webpack and hot-reloading in no time!
6666

67-
To learn more about Webpack itself, check out [their official docs](https://webpack.js.org/configuration/) and [Webpack Academy](https://webpack.academy/p/the-core-concepts). In Webpack, each file can be transformed by a "loader" before being included in the bundle, and Vue offers the [vue-loader](https://vue-loader.vuejs.org) plugin to translate single-file (`.vue`) components.
68-
6967
### For Advanced Users
7068

71-
Whether you prefer Webpack or Browserify, we have documented templates for both simple and more complex projects. We recommend browsing [github.com/vuejs-templates](https://github.com/vuejs-templates), picking a template that's right for you, then following the instructions in the README to generate a new project with [vue-cli](https://github.com/vuejs/vue-cli).
69+
The CLI takes care of most of the tooling configurations for you, but also allows fine-grained customization through its own [config options](https://cli.vuejs.org/config/).
70+
71+
In case you prefer setting up your own build setup from scratch, you will need to manually configure webpack with [vue-loader](https://vue-loader.vuejs.org). To learn more about webpack itself, check out [their official docs](https://webpack.js.org/configuration/) and [Webpack Academy](https://webpack.academy/p/the-core-concepts).

Diff for: src/v2/guide/typescript.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: TypeScript Support
33
type: guide
4-
order: 404
4+
order: 403
55
---
66

7-
> In Vue 2.5.0+ we have greatly improved our type declarations to work with the default object-based API. At the same time it introduces a few changes that require upgrade actions. Read [this blog post](https://medium.com/the-vue-point/upcoming-typescript-changes-in-vue-2-5-e9bd7e2ecf08) for more details.
7+
> [Vue CLI](https://cli.vuejs.org) provides built-in TypeScript tooling support. In our next major version of Vue (3.x), we are also planning to considerably improve our TypeScript support with built-in class based components API and TSX support.
88
99
## Official Declaration in NPM Packages
1010

Diff for: src/v2/guide/unit-testing.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
22
title: Unit Testing
33
type: guide
4-
order: 403
4+
order: 402
55
---
66

7-
## Setup and Tooling
8-
9-
Anything compatible with a module-based build system will work, but if you're looking for a specific recommendation try the [Karma](http://karma-runner.github.io) test runner. It has a lot of community plugins, including support for [Webpack](https://github.com/webpack/karma-webpack) and [Browserify](https://github.com/Nikku/karma-browserify). For detailed setup please refer to each project's respective documentation. These example Karma configurations for [Webpack](https://github.com/vuejs-templates/webpack/blob/master/template/test/unit/karma.conf.js) and [Browserify](https://github.com/vuejs-templates/browserify/blob/master/template/karma.conf.js) can help you get started.
7+
> [Vue CLI](https://cli.vuejs.org/) has built-in options for unit testing with [Jest](https://github.com/facebook/jest) or [Mocha](https://mochajs.org/) that works out of the box. We also have the official [vue-test-utils](https://vue-test-utils.vuejs.org/) which provides more detailed guidance for custom setups.
108
119
## Simple Assertions
1210

@@ -31,7 +29,7 @@ You don't have to do anything special in your components to make them testable.
3129
</script>
3230
```
3331

34-
Then import the component options along with Vue, and you can make many common assertions:
32+
Then import the component options along with Vue, and you can make many common assertions (here we are using Jasmine/Jest style `expect` assertions just as an example):
3533

3634
``` js
3735
// Import Vue and the component being tested
@@ -129,6 +127,4 @@ it('updates the rendered message when vm.message updates', done => {
129127
})
130128
```
131129

132-
We are planning to work on a collection of common test helpers to make it easier to render components with different constraints (e.g. shallow rendering that ignores child components) and assert their output.
133-
134130
For more in-depth information on unit testing in Vue, check out [Vue Test Utils](https://vue-test-utils.vuejs.org/) and our cookbook entry about [unit testing vue components](https://vuejs.org/v2/cookbook/unit-testing-vue-components.html).

Diff for: themes/vue/layout/partials/toc.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<% if (fileName === 'mixins') { %>
1515
<li><h3>Reusability & Composition</h3></li>
1616
<% } %>
17-
<% if (fileName === 'deployment') { %>
17+
<% if (fileName === 'single-file-components') { %>
1818
<li><h3>Tooling</h3></li>
1919
<% } %>
2020
<% if (fileName === 'routing') { %>

0 commit comments

Comments
 (0)