Skip to content

Commit c88e694

Browse files
committed
docs: revisions
1 parent fd1ca02 commit c88e694

File tree

6 files changed

+22
-17
lines changed

6 files changed

+22
-17
lines changed

docs/README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ Probably the most common configuration need is tweaking the internal webpack con
102102

103103
See [here](./webpack.md) for full details.
104104

105-
### browserlist
105+
### browserslist
106106

107-
You will notice a `browserlist` field in `package.json` specifying a range of browsers the project is targeting. This value will be used by `babel-preset-env` and `autoprefixer` to automatically determine the JavaScript polyfills and CSS vendor prefixes needed.
107+
You will notice a `browserslist` field in `package.json` specifying a range of browsers the project is targeting. This value will be used by `babel-preset-env` and `autoprefixer` to automatically determine the JavaScript polyfills and CSS vendor prefixes needed.
108108

109109
See [here](https://github.com/ai/browserslist) for how to specify browser ranges.
110110

@@ -118,15 +118,7 @@ See [Configuring Proxy](./cli-service.md#configuring-proxy) for more details.
118118

119119
Babel can be configured via `.babelrc` or the `babel` field in `package.json`.
120120

121-
All Vue CLI apps use `@vue/babel-preset-app` by default, which includes:
122-
123-
- [babel-preset-env](https://github.com/babel/babel/tree/master/packages/babel-preset-env)
124-
- [dynamic import syntax](https://github.com/tc39/proposal-dynamic-import)
125-
- [Object rest spread](https://github.com/tc39/proposal-object-rest-spread)
126-
- [babel-preset-stage-2](https://github.com/babel/babel/tree/master/packages/babel-preset-stage-2)
127-
- Vue JSX support
128-
129-
See [@vue/babel-preset-app](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app) for preset options.
121+
All Vue CLI apps use `@vue/babel-preset-app`, which includes `babel-preset-env`, JSX support and optimized configuration for minimal bundle size overhead. See [its docs](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app) for details and preset options.
130122

131123
### CSS
132124

docs/assets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ will be compiled into:
2121
createElement('img', { attrs: { src: require('../image.png') }})
2222
```
2323

24-
Internally, we use `file-loader` to determine the final file location with version hashes and correct public base paths, and use `url-loader` to conditional inline assets that are smaller than 10kb, reducing the amount of HTTP requests.
24+
Internally, we use `file-loader` to determine the final file location with version hashes and correct public base paths, and use `url-loader` to conditionally inline assets that are smaller than 10kb, reducing the amount of HTTP requests.
2525

2626
#### URL Transform Rules
2727

docs/build-targets.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ A lib build outputs:
3838

3939
- `dist/myLib.css`: Extracted CSS file (can be forced into inlined by setting `css: { extract: false }` in `vue.config.js`)
4040

41+
**In lib mode, Vue is externalized.** This means the bundle will not bundle Vue even if your code imports Vue. If the lib is used via a bundler, it will attempt to load Vue as a dependency through the bundler; otherwise, it falls back to a global `Vue` variable.
42+
4143
### Web Component
4244

4345
> [Compatibility](https://github.com/vuejs/vue-web-component-wrapper#compatibility)
@@ -50,7 +52,7 @@ vue-cli-service build --target wc --name my-element [entry]
5052

5153
This will produce a single JavaScript file (and its minified version) with everything inlined. The script, when included on a page, registers the `<my-element>` custom element, which wraps the target Vue component using `@vue/web-component-wrapper`. The wrapper automatically proxies properties, attributes, events and slots. See the [docs for `@vue/web-component-wrapper`](https://github.com/vuejs/vue-web-component-wrapper) for more details.
5254

53-
Note the bundle relies on `Vue` being globally available on the page.
55+
**Note the bundle relies on `Vue` being globally available on the page.**
5456

5557
This mode allows consumers of your component to use the Vue component as a normal DOM element:
5658

docs/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ vue build MyComponent.vue
131131
Each CLI plugin ships with a generator (which creates files) and a runtime plugin (which tweaks the core webpack config and injects commands). When you use `vue create` to create a new project, some plugins will be pre-installed for you based on your feature selection. In case you want to install a plugin into an already created project, simply install it first:
132132

133133
``` sh
134-
yarn add @vue/cli-plugin-eslint
134+
npm install -D @vue/cli-plugin-eslint
135135
```
136136

137137
Then you can invoke the plugin's generator so it generates files into your project:
@@ -158,7 +158,7 @@ You can use `vue inspect` to inspect the webpack config inside a Vue CLI project
158158
`@vue/cli` uses the same `vue` binary, so it overwrites `[email protected]`. If you still need the legacy `vue init` functionality, you can install a global bridge:
159159

160160
``` sh
161-
yarn global add @vue/cli-init
161+
npm install -g @vue/cli-init
162162
# vue init now works exactly the same as [email protected]
163163
vue init webpack my-project
164164
```

docs/css.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you wish to be able to use CSS modules without the `.module` postfix, you can
1919

2020
### Pre-Processors
2121

22-
You can select pre-processors (Sass/Less/Stylus) when creating the project. If you did not do so, you can also just manually install the corresponding webpack loaders. The loaders are pre-configured and will automatically be picked up. For example, to add SASS to an existing project, simply run:
22+
You can select pre-processors (Sass/Less/Stylus) when creating the project. If you did not do so, you can also just manually install the corresponding webpack loaders. The loaders are pre-configured and will automatically be picked up. For example, to add Sass to an existing project, simply run:
2323

2424
``` sh
2525
npm install -D sass-loader node-sass

packages/@vue/cli-plugin-eslint/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,18 @@
66

77
- **`vue-cli-service lint`**
88

9-
Lints and fixes files in `src` and `test`.
9+
```
10+
Usage: vue-cli-service lint [options] [...files]
11+
12+
Options:
13+
14+
--format [formatter] specify formatter (default: codeframe)
15+
--no-fix do not fix errors
16+
```
17+
18+
Lints and fixes files. If no specific files are given, it lints all files in `src` and `test`.
19+
20+
Other [ESLint CLI options](https://eslint.org/docs/user-guide/command-line-interface#options) are also supported.
1021

1122
## Configuration
1223

0 commit comments

Comments
 (0)