Skip to content

Commit 6f12d35

Browse files
committed
docs: merge branch 'docs' into dev [ci skip]
2 parents 3f434f6 + e810806 commit 6f12d35

File tree

9 files changed

+77
-8
lines changed

9 files changed

+77
-8
lines changed

docs/.vuepress/config.js

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ module.exports = {
1717
}
1818
},
1919
serviceWorker: true,
20+
head: [
21+
['link', { rel: 'icon', href: '/favicon.png' }],
22+
],
2023
theme: 'vue',
2124
themeConfig: {
2225
repo: 'vuejs/vue-cli',
File renamed without changes.

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
home: true
3-
heroImage: /logo.png
3+
heroImage: /favicon.png
44
actionText: Get Started →
55
actionLink: /guide/
66
footer: MIT Licensed | Copyright © 2018-present Evan You

docs/guide/deployment.md

+35-2
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ If you are using the PWA plugin, your app must be served over HTTPS so that [Ser
5858
set -e
5959
6060
# build
61-
npm run docs:build
61+
npm run build
6262
6363
# navigate into the build output directory
64-
cd docs/.vuepress/dist
64+
cd dist
6565
6666
# if you are deploying to a custom domain
6767
# echo 'www.example.com' > CNAME
@@ -273,3 +273,36 @@ Then cd into the `dist/` folder of your project and then run `surge` and follow
273273
```
274274

275275
Verify your project is successfully published by Surge by visiting `myawesomeproject.surge.sh`, vola! For more setup details such as custom domains, you can visit [Surge's help page](https://surge.sh/help/).
276+
277+
### Bitbucket Cloud
278+
279+
1. As described in the [Bitbucket documentation](https://confluence.atlassian.com/bitbucket/publishing-a-website-on-bitbucket-cloud-221449776.html) you need to create a repository named exactly `<USERNAME>.bitbucket.io`.
280+
281+
2. It is possible to publish to a subfolder of the main repository, for instance if you want to have multiple websites. In that case set correct `baseUrl` in `vue.config.js`.
282+
283+
If you are deploying to `https://<USERNAME>.bitbucket.io/`, you can omit `baseUrl` as it defaults to `"/"`.
284+
285+
If you are deploying to `https://<USERNAME>.bitbucket.io/<SUBFOLDER>/`, set `baseUrl` to `"/<SUBFOLDER>/"`. In this case the directory structure of the repository should reflect the url structure, for instance the repository should have a `/<SUBFOLDER>` directory.
286+
287+
3. Inside your project, create `deploy.sh` with the following content and run it to deploy:
288+
289+
``` bash{13,20,23}
290+
#!/usr/bin/env sh
291+
292+
# abort on errors
293+
set -e
294+
295+
# build
296+
npm run build
297+
298+
# navigate into the build output directory
299+
cd dist
300+
301+
git init
302+
git add -A
303+
git commit -m 'deploy'
304+
305+
git push -f [email protected]:<USERNAME>/<USERNAME>.bitbucket.io.git master
306+
307+
cd -
308+
```

docs/guide/webpack.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ module.exports = {
123123
}
124124
```
125125

126-
You will need to familiarize yourself with [webpack-chain's API](https://github.com/mozilla-neutrino/webpack-chain#getting-started) and [read some source code](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config) in order to understand how to leverage the full power of this option, but it gives you a more expressive and safer way to modify the webpack config than directly mutation values.
126+
You will need to familiarize yourself with [webpack-chain's API](https://github.com/mozilla-neutrino/webpack-chain#getting-started) and [read some source code](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config) in order to understand how to leverage the full power of this option, but it gives you a more expressive and safer way to modify the webpack config than directly mutate values.
127127

128128
For example, say you want to change the default location of `index.html` from `/Users/username/proj/public/index.html` to `/Users/username/proj/app/templates/index.html`. By referencing [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin#options) you can see a list of options you can pass in. To change our template path we can pass in a new template path with the following config:
129129

@@ -182,7 +182,7 @@ vue inspect --plugins
182182

183183
## Using Resolved Config as a File
184184

185-
Some external tools may need access to the resolved webpack config as a file, for example IDEs or command line tools that expects a webpack config path. In that case you can use the following path:
185+
Some external tools may need access to the resolved webpack config as a file, for example IDEs or command line tools that expect a webpack config path. In that case you can use the following path:
186186

187187
```
188188
<projectRoot>/node_modules/@vue/cli-service/webpack.config.js

docs/ru/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
home: true
3-
heroImage: /logo.png
3+
heroImage: /favicon.png
44
actionText: Введение →
55
actionLink: /ru/guide/
66
footer: MIT Licensed | Copyright © 2018-present Evan You

docs/ru/guide/build-targets.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
- `index.html` с внедрением ресурсов и подсказок для пред-загрузки
1010
- сторонние библиотеки разделяются на отдельные фрагменты для лучшего кэширования
11-
- статические ресурсы менее 10КБайт будут вставлены инлайн в JavaScript
11+
- статические ресурсы менее 4 КБайт будут вставлены инлайн в JavaScript
1212
- статические ресурсы в `public` будут скопированы в каталог сборки
1313

1414
## Библиотека (Library)

docs/ru/guide/deployment.md

+33
Original file line numberDiff line numberDiff line change
@@ -273,3 +273,36 @@ npm install --global surge
273273
```
274274

275275
Убедитесь, что ваш проект успешно опубликован с помощью Surge открыв в браузере `myawesomeproject.surge.sh`! Дополнительные сведения о настройке, такие как конфигурация пользовательских доменов, можно найти на [странице справки Surge](https://surge.sh/help/).
276+
277+
### Bitbucket Cloud
278+
279+
1. Как описывается в [документации Bitbucket](https://confluence.atlassian.com/bitbucket/publishing-a-website-on-bitbucket-cloud-221449776.html) вам необходимо создать репозиторий названный в точности `<USERNAME>.bitbucket.io`.
280+
281+
2. Возможно публиковать в подкаталог, например, если требуется иметь несколько веб-сайтов. В этом случае укажите корректный `baseUrl` в файле `vue.config.js`.
282+
283+
Если публикуете по адресу `https://<USERNAME>.bitbucket.io/`, установку `baseUrl` можно опустить, поскольку значение по умолчанию `"/"`.
284+
285+
Если публикуете по адресу `https://<USERNAME>.bitbucket.io/<SUBFOLDER>/`, нужно задать `baseUrl` в значение `"/<SUBFOLDER>/"`. В этом случае структура каталогов должна отражать структуру URL-адресов, например, репозиторий должен иметь каталог `/<SUBFOLDER>`.
286+
287+
3. В проекте создайте `deploy.sh` с указанным содержимым и запустите его для публикации:
288+
289+
``` bash{13,20,23}
290+
#!/usr/bin/env sh
291+
292+
# остановиться при ошибках
293+
set -e
294+
295+
# сборка
296+
npm run build
297+
298+
# переход в каталог итоговой сборки
299+
cd dist
300+
301+
git init
302+
git add -A
303+
git commit -m 'deploy'
304+
305+
git push -f [email protected]:<USERNAME>/<USERNAME>.bitbucket.io.git master
306+
307+
cd -
308+
```

docs/zh/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
home: true
3-
heroImage: /logo.png
3+
heroImage: /favicon.png
44
actionText: 起步 →
55
actionLink: /zh/guide/
66
features:

0 commit comments

Comments
 (0)