Skip to content

Commit 1ce40cd

Browse files
committed
docs: Merge branch 'docs' into dev
2 parents 5870999 + 45cc5e9 commit 1ce40cd

File tree

9 files changed

+53
-3
lines changed

9 files changed

+53
-3
lines changed

docs/guide/browser-compatibility.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ See [here][browserslist] for how to specify browser ranges.
88

99
## Polyfills
1010

11-
A default Vue CLI project uses [@vue/babel-preset-app][babel-preset-env], which uses `@babel/preset-env` and the `browserslist` config to determine the Polyfills needed for your project.
11+
A default Vue CLI project uses [@vue/babel-preset-app][babel-preset-app], which uses `@babel/preset-env` and the `browserslist` config to determine the Polyfills needed for your project.
1212

1313
By default, it passes [`useBuiltIns: 'usage'`](https://new.babeljs.io/docs/en/next/babel-preset-env.html#usebuiltins-usage) to `@babel/preset-env` which automatically detects the polyfills needed based on the language features used in your source code. This ensures only the minimum amount of polyfills are included in your final bundle. However, this also means **if one of your dependencies has specific requirements on polyfills, by default Babel won't be able to detect it.**
1414

@@ -68,4 +68,5 @@ For a Hello World app, the modern bundle is already 16% smaller. In production,
6868
6969
[autoprefixer]: https://github.com/postcss/autoprefixer
7070
[babel-preset-env]: https://new.babeljs.io/docs/en/next/babel-preset-env.html
71+
[babel-preset-app]: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app
7172
[browserslist]: https://github.com/ai/browserslist

docs/guide/build-targets.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ You can build a single entry as a web component using
7676
vue-cli-service build --target wc --name my-element [entry]
7777
```
7878

79-
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.
79+
Note that the entry should be a `*.vue` file. Vue CLI will automatically wrap and register the component as a Web Component for you, and there's no need to do this yourself in `main.js`. You can use `main.js` as a demo app solely for development.
80+
81+
The build 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.
8082

8183
**Note the bundle relies on `Vue` being globally available on the page.**
8284

docs/guide/creating-a-project.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ To create a new project, run:
88
vue create hello-world
99
```
1010

11+
::: warning
12+
If you are on Windows using Git Bash with minTTY, the interactive prompts will not work. You must launch the command as `winpty vue.cmd create hello-world`.
13+
:::
14+
1115
You will be prompted to pick a preset. You can either choose the default preset which comes with a basic Babel + ESLint setup, or select "Manually select features" to pick the features you need.
1216

1317
![CLI preview](/cli-new-project.png)
@@ -43,7 +47,7 @@ Options:
4347
-i, --inlinePreset <json> Skip prompts and use inline JSON string as preset
4448
-m, --packageManager <command> Use specified npm client when installing dependencies
4549
-r, --registry <url> Use specified npm registry when installing dependencies (only for npm)
46-
-g, --git [message|false] Force / skip git intialization, optionally specify initial commit message
50+
-g, --git [message|false] Force / skip git initialization, optionally specify initial commit message
4751
-f, --force Overwrite target directory if it exists
4852
-c, --clone Use git clone when fetching remote preset
4953
-x, --proxy Use specified proxy when creating project

docs/guide/mode-and-env.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ VUE_APP_SECRET=secret
1818

1919
Loaded variables will become available to all `vue-cli-service` commands, plugins and dependencies.
2020

21+
::: tip Env Loading Priorities
22+
23+
An env file for a specific mode (e.g. `.env.production`) will take higher priority than a generic one (e.g. `.env`).
24+
25+
In addition, environment variables that already exist when Vue CLI is bootstrapped have the highest priority and will not be overwritten by `.env` files. If you have a default `NODE_ENV` in your environment, you might want to consider removing it.
26+
:::
27+
2128
## Modes
2229

2330
**Mode** is an important concept in Vue CLI projects. By default, there are three modes in a Vue CLI project:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
# @vue/eslint-config-airbnb
22

33
> eslint-config-airbnb for vue-cli
4+
5+
This config is specifically designed to be used by `vue-cli` setups
6+
and is not meant for outside use (it can be used but some adaptations
7+
on the user side might be needed - for details see the config file).
8+
9+
A part of its design is that this config may implicitly depend on
10+
other parts of `vue-cli` setups, such as `eslint-plugin-vue` being
11+
extended in the same resulting config.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
# @vue/eslint-config-prettier
22

33
> eslint-config-prettier for vue-cli
4+
5+
This config is specifically designed to be used by `vue-cli` setups
6+
and is not meant for outside use (it can be used but some adaptations
7+
on the user side might be needed - for details see the config file).
8+
9+
A part of its design is that this config may implicitly depend on
10+
other parts of `vue-cli` setups, such as `eslint-plugin-vue` being
11+
extended in the same resulting config.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
# @vue/eslint-config-standard
22

33
> eslint-config-standard for vue-cli
4+
5+
This config is specifically designed to be used by `vue-cli` setups
6+
and is not meant for outside use (it can be used but some adaptations
7+
on the user side might be needed - for details see the config file).
8+
9+
A part of its design is that this config may implicitly depend on
10+
other parts of `vue-cli` setups, such as `eslint-plugin-vue` being
11+
extended in the same resulting config.

packages/@vue/eslint-config-typescript/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@
33
> eslint-config-typescript for vue-cli
44
55
See [eslint-plugin-typescript](https://github.com/nzakas/eslint-plugin-typescript) for available rules.
6+
7+
This config is specifically designed to be used by `vue-cli` setups
8+
and is not meant for outside use (it can be used but some adaptations
9+
on the user side might be needed - for details see the config file).
10+
11+
A part of its design is that this config may implicitly depend on
12+
other parts of `vue-cli` setups, such as `eslint-plugin-vue` being
13+
extended in the same resulting config.

packages/@vue/eslint-config-typescript/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
module.exports = {
22
plugins: ['typescript'],
3+
// Prerequisite `eslint-plugin-vue`, being extended, sets
4+
// root property `parser` to `'vue-eslint-parser'`, which, for code parsing,
5+
// in turn delegates to the parser, specified in `parserOptions.parser`:
6+
// https://github.com/vuejs/eslint-plugin-vue#what-is-the-use-the-latest-vue-eslint-parser-error
37
parserOptions: {
48
parser: require.resolve('typescript-eslint-parser')
59
},

0 commit comments

Comments
 (0)