Skip to content

Commit 9577cf5

Browse files
committed
chore: Merge branch 'master' into dev
2 parents 8b5ab22 + c9f5af2 commit 9577cf5

File tree

15 files changed

+92
-24
lines changed

15 files changed

+92
-24
lines changed

docs/config/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ The file should export an object containing options:
2222

2323
``` js
2424
// vue.config.js
25+
26+
/**
27+
* @type {import('@vue/cli-service').ProjectOptions}
28+
*/
2529
module.exports = {
2630
// options...
2731
}

docs/core-plugins/unit-jest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ transformIgnorePatterns: ['/node_modules/']
6060
We have to add exceptions to this pattern with a RegExp negative lookahead:
6161

6262
```javascript
63-
transformIgnorePatterns: ['/node_modules/(?!name-of-lib-o-transform)']
63+
transformIgnorePatterns: ['/node_modules/(?!name-of-lib-to-transform)']
6464
```
6565

6666
To exclude multiple libraries:

docs/guide/creating-a-project.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ Options:
5353
-g, --git [message|false] Force / skip git initialization, optionally specify initial commit message
5454
-n, --no-git Skip git initialization
5555
-f, --force Overwrite target directory if it exists
56+
--merge Merge target directory if it exists
5657
-c, --clone Use git clone when fetching remote preset
5758
-x, --proxy Use specified proxy when creating project
5859
-b, --bare Scaffold project without beginner instructions
60+
--skipGetStarted Skip displaying "Get started" instructions
5961
-h, --help Output usage information
6062
```
6163

docs/guide/css.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ npm install -D less-loader less
2121
npm install -D stylus-loader stylus
2222
```
2323

24+
::: tip Note on webpack 4
25+
When using `webpack` version 4, the default in Vue CLI 4, you need to make sure your loaders are compatible with it. Otherwise you will get errors about confliciting peer dependencies. In this case you can use an older version of the loader that is still compatible with `webpack` 4.
26+
27+
``` bash
28+
# Sass
29+
npm install -D sass-loader@^10 sass
30+
```
31+
:::
32+
2433
Then you can import the corresponding file types, or use them in `*.vue` files with:
2534

2635
``` vue

docs/guide/deployment.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ If you are using the PWA plugin, your app must be served over HTTPS so that [Ser
3939

4040
1. Set correct `publicPath` in `vue.config.js`.
4141

42-
If you are deploying to `https://<USERNAME>.github.io/`, you can omit `publicPath` as it defaults to `"/"`.
42+
If you are deploying to `https://<USERNAME>.github.io/` or to a custom domain, you can omit `publicPath` as it defaults to `"/"`.
4343

4444
If you are deploying to `https://<USERNAME>.github.io/<REPO>/`, (i.e. your repository is at `https://github.com/<USERNAME>/<REPO>`), set `publicPath` to `"/<REPO>/"`. For example, if your repo name is "my-project", your `vue.config.js` should look like this:
4545

@@ -75,10 +75,10 @@ If you are using the PWA plugin, your app must be served over HTTPS so that [Ser
7575
git commit -m 'deploy'
7676
7777
# if you are deploying to https://<USERNAME>.github.io
78-
# git push -f [email protected]:<USERNAME>/<USERNAME>.github.io.git master
78+
# git push -f [email protected]:<USERNAME>/<USERNAME>.github.io.git main
7979
8080
# if you are deploying to https://<USERNAME>.github.io/<REPO>
81-
# git push -f [email protected]:<USERNAME>/<REPO>.git master:gh-pages
81+
# git push -f [email protected]:<USERNAME>/<REPO>.git main:gh-pages
8282
8383
cd -
8484
```
@@ -112,7 +112,7 @@ If you are using the PWA plugin, your app must be served over HTTPS so that [Ser
112112
github_token: $GITHUB_TOKEN
113113
local_dir: dist
114114
on:
115-
branch: master
115+
branch: main
116116
```
117117

118118
6. Push the `.travis.yml` file to your repository to trigger the first build.
@@ -363,7 +363,7 @@ heroku login
363363
heroku create
364364
heroku buildpacks:add heroku/nodejs
365365
heroku buildpacks:add https://github.com/heroku/heroku-buildpack-static
366-
git push heroku master
366+
git push heroku main
367367
```
368368

369369
More info: [Getting started with SPAs on Heroku](https://gist.github.com/hone/24b06869b4c1eca701f9)

docs/guide/mode-and-env.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ And the following `.env.staging` file:
8686

8787
```
8888
NODE_ENV=production
89-
VUE_APP_TITLE=My App (staging)
89+
VUE_APP_TITLE=My Staging App
9090
```
9191

9292
- `vue-cli-service build` builds a production app, loading `.env`, `.env.production` and `.env.production.local` if they are present;

docs/ru/config/index.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ sidebar: auto
2222

2323
```js
2424
// vue.config.js
25+
26+
/**
27+
* @type {import('@vue/cli-service').ProjectOptions}
28+
*/
2529
module.exports = {
2630
// настройки...
2731
}
@@ -267,7 +271,7 @@ module.exports = {
267271
- Тип: `boolean | Object`
268272
- По умолчанию: `true` в режиме production, `false` в режиме development
269273

270-
Извлечение CSS из ваших компонентов в отдельные CSS-файлы (вместо инлайна в JavaScript и динамического внедрения).
274+
Извлечение CSS из ваших компонентов в отдельный CSS-файл (вместо инлайна в JavaScript и динамического внедрения).
271275

272276
Это всегда отключается при сборке веб-компонентов (в этом случае инлайн стили внедряются в shadowRoot).
273277

@@ -373,6 +377,16 @@ module.exports = {
373377
}
374378
```
375379

380+
### devServer.inline
381+
382+
- Тип: `boolean`
383+
- По умолчанию: `true`
384+
385+
Переключение между двумя режимами работы сервера разработки. Более подробная информация об опции — [devServer.inline](https://webpack.js.org/configuration/dev-server/#devserverinline). Обратите внимание:
386+
387+
- При использовании `iframe mode` дополнительная конфигурация не требуется. Просто перейдите в браузере по адресу `http://<host>:<port>/webpack-dev-server/<path>` для отладки приложения. В верхней части страницы будут появляться уведомления.
388+
- При использовании `inline mode`, просто перейдите в браузере по адресу `http://<host>:<port>/<path>` для отладки приложения. Сообщения о сборке будут появляться в консоли браузера.
389+
376390
### parallel
377391

378392
- Тип: `boolean | number`

docs/ru/core-plugins/eslint.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@
1717
--max-warnings количество предупреждений, по достижению которого сборка заканчивается ошибкой (по умолчанию: Infinity)
1818
```
1919

20-
Проверяет и исправляет файлы. Если конкретные файлы для проверки не указаны, то будут проверяться все файлы в `src` и `tests`.
20+
Проверяет и исправляет файлы. Если не указаны конкретные файлы для проверки, то будут проверяться все файлы в `src` и `tests`, а также все файлы JavaScript в корневом каталоге (чаще всего это файлы конфигурации, например `babel.config.js` или `.eslintrc.js`).
2121

22-
Другие [настройки ESLint CLI](https://eslint.org/docs/user-guide/command-line-interface#options) также поддерживаются.
22+
Также поддерживаются и другие [настройки ESLint CLI](https://eslint.org/docs/user-guide/command-line-interface#options).
23+
24+
:::tip Совет
25+
По умолчанию `vue-cli-service lint` проверяет файлы, именуемые с точки `.*.js`. Если вместо этого требуется поведение ESLint по умолчанию, то следует добавить в проект файл `.eslintignore`.
26+
:::
2327

2428
## Конфигурация
2529

docs/ru/guide/cli-service.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,16 @@ npx vue-cli-service help
123123
npx vue-cli-service help [command]
124124
```
125125

126-
## Пропуск плагинов
126+
## Исключение плагинов при запуске
127127

128-
Иногда при выполнении команды может понадобиться не использовать определённый плагин CLI. К примеру, для создания сборки приложения без плагина PWA. Такого можно добиться передав имя плагина в опцию `--skip-plugins`.
128+
Можно исключить определённые плагины при запуске команды, передав имя плагина опцией `--skip-plugins`.
129129

130130
```bash
131131
npx vue-cli-service build --skip-plugins pwa
132132
```
133133

134134
::: tip СОВЕТ
135-
Опция доступна для _любых_ команд `vue-cli-service`, включая пользовательские команды, добавленные другими плагинами.
135+
Опция доступна для _любых_ команд `vue-cli-service`, в том числе и для пользовательских команд, добавленных другими плагинами.
136136
:::
137137

138138
Можно пропустить несколько подключаемых плагинов, передав их имена через запятую:

docs/ru/guide/css.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ npm install -D less-loader less
2121
npm install -D stylus-loader stylus
2222
```
2323

24+
:::tip Примечание при использовании webpack 4
25+
При использовании `webpack` версии 4, по умолчанию во Vue CLI 4, следует убедиться в совместимости используемых загрузчиков. В противном случае будут появляться ошибки о конфликтующих зависимостях. В таких случаях можно использовать более старую версию загрузчика, которая всё ещё совместима с `webpack` 4.
26+
27+
```bash
28+
# Sass
29+
npm install -D sass-loader@^10 sass
30+
```
31+
:::
32+
2433
Теперь вы можете импортировать соответствующие типы файлов, или использовать их синтаксис внутри файлов `*.vue` с помощью:
2534

2635
```vue

0 commit comments

Comments
 (0)