From 4b69388c28eca3fdfbb683ff3bf84c83dbc41fd5 Mon Sep 17 00:00:00 2001 From: Simone Busoli Date: Fri, 17 Aug 2018 16:08:31 +0200 Subject: [PATCH 1/6] docs: add bitbucket cloud deployment documentation (#2256) --- docs/guide/deployment.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/guide/deployment.md b/docs/guide/deployment.md index 052aafa29..b051b5df9 100644 --- a/docs/guide/deployment.md +++ b/docs/guide/deployment.md @@ -273,3 +273,36 @@ Then cd into the `dist/` folder of your project and then run `surge` and follow ``` 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/). + +### Bitbucket Cloud + +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 `.bitbucket.io`. + +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`. + + If you are deploying to `https://.bitbucket.io/`, you can omit `baseUrl` as it defaults to `"/"`. + + If you are deploying to `https://.bitbucket.io//`, set `baseUrl` to `"//"`. In this case the directory structure of the repository should reflect the url structure, for instance the repository should have a `/` directory. + +3. Inside your project, create `deploy.sh` with the following content and run it to deploy: + + ``` bash{13,20,23} + #!/usr/bin/env sh + + # abort on errors + set -e + + # build + npm run build + + # navigate into the build output directory + cd dist + + git init + git add -A + git commit -m 'deploy' + + git push -f git@bitbucket.org:/.bitbucket.io.git master + + cd - + ``` From 7957600b05620042407f7e626dea78b32fdc1c45 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Mon, 20 Aug 2018 17:31:43 +0200 Subject: [PATCH 2/6] docs: fix deploy.sh example with correct commands (#2269) [ci skip] --- docs/guide/deployment.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/deployment.md b/docs/guide/deployment.md index b051b5df9..eda245f38 100644 --- a/docs/guide/deployment.md +++ b/docs/guide/deployment.md @@ -58,10 +58,10 @@ If you are using the PWA plugin, your app must be served over HTTPS so that [Ser set -e # build - npm run docs:build + npm run build # navigate into the build output directory - cd docs/.vuepress/dist + cd dist # if you are deploying to a custom domain # echo 'www.example.com' > CNAME From e1c17dc18336abebc11bf47a73fcfc7716c5d3be Mon Sep 17 00:00:00 2001 From: Alexander Sokolov Date: Mon, 20 Aug 2018 18:37:37 +0300 Subject: [PATCH 3/6] docs: [RU] Translation update (#2267) [ci skip] --- docs/ru/guide/build-targets.md | 2 +- docs/ru/guide/deployment.md | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/docs/ru/guide/build-targets.md b/docs/ru/guide/build-targets.md index 68feea06d..72c07b586 100644 --- a/docs/ru/guide/build-targets.md +++ b/docs/ru/guide/build-targets.md @@ -8,7 +8,7 @@ - `index.html` с внедрением ресурсов и подсказок для пред-загрузки - сторонние библиотеки разделяются на отдельные фрагменты для лучшего кэширования -- статические ресурсы менее 10КБайт будут вставлены инлайн в JavaScript +- статические ресурсы менее 4 КБайт будут вставлены инлайн в JavaScript - статические ресурсы в `public` будут скопированы в каталог сборки ## Библиотека (Library) diff --git a/docs/ru/guide/deployment.md b/docs/ru/guide/deployment.md index bb514567a..184ffcec6 100644 --- a/docs/ru/guide/deployment.md +++ b/docs/ru/guide/deployment.md @@ -273,3 +273,36 @@ npm install --global surge ``` Убедитесь, что ваш проект успешно опубликован с помощью Surge открыв в браузере `myawesomeproject.surge.sh`! Дополнительные сведения о настройке, такие как конфигурация пользовательских доменов, можно найти на [странице справки Surge](https://surge.sh/help/). + +### Bitbucket Cloud + +1. Как описывается в [документации Bitbucket](https://confluence.atlassian.com/bitbucket/publishing-a-website-on-bitbucket-cloud-221449776.html) вам необходимо создать репозиторий названный в точности `.bitbucket.io`. + +2. Возможно публиковать в подкаталог, например, если требуется иметь несколько веб-сайтов. В этом случае укажите корректный `baseUrl` в файле `vue.config.js`. + + Если публикуете по адресу `https://.bitbucket.io/`, установку `baseUrl` можно опустить, поскольку значение по умолчанию `"/"`. + + Если публикуете по адресу `https://.bitbucket.io//`, нужно задать `baseUrl` в значение `"//"`. В этом случае структура каталогов должна отражать структуру URL-адресов, например, репозиторий должен иметь каталог `/`. + +3. В проекте создайте `deploy.sh` с указанным содержимым и запустите его для публикации: + + ``` bash{13,20,23} + #!/usr/bin/env sh + + # остановиться при ошибках + set -e + + # сборка + npm run build + + # переход в каталог итоговой сборки + cd dist + + git init + git add -A + git commit -m 'deploy' + + git push -f git@bitbucket.org:/.bitbucket.io.git master + + cd - + ``` From 566464398d271d3aba0406495f703b25b7f73a3c Mon Sep 17 00:00:00 2001 From: Robert Wildling Date: Tue, 28 Aug 2018 12:23:26 +0200 Subject: [PATCH 4/6] docs: Correct 2 minor grammar errors. (#2378) --- docs/guide/webpack.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/webpack.md b/docs/guide/webpack.md index b765860b8..28443ce0a 100644 --- a/docs/guide/webpack.md +++ b/docs/guide/webpack.md @@ -123,7 +123,7 @@ module.exports = { } ``` -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. +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. 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: @@ -182,7 +182,7 @@ vue inspect --plugins ## Using Resolved Config as a File -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: +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: ``` /node_modules/@vue/cli-service/webpack.config.js From 492d5642678a6c63a21a358031dae2188f720ac9 Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Sun, 2 Sep 2018 14:43:13 +0200 Subject: [PATCH 5/6] docs: add favicon, closes #2423 --- docs/.vuepress/config.js | 3 +++ docs/.vuepress/public/{logo.png => favicon.png} | Bin docs/README.md | 2 +- docs/ru/README.md | 2 +- docs/zh/README.md | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) rename docs/.vuepress/public/{logo.png => favicon.png} (100%) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 248dd6d6d..67abfecb8 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -17,6 +17,9 @@ module.exports = { } }, serviceWorker: true, + head: [ + ['link', { rel: 'icon', href: '/favicon.png' }], + ], theme: 'vue', themeConfig: { repo: 'vuejs/vue-cli', diff --git a/docs/.vuepress/public/logo.png b/docs/.vuepress/public/favicon.png similarity index 100% rename from docs/.vuepress/public/logo.png rename to docs/.vuepress/public/favicon.png diff --git a/docs/README.md b/docs/README.md index 25ab320ca..9d6c370f4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ --- home: true -heroImage: /logo.png +heroImage: /favicon.png actionText: Get Started → actionLink: /guide/ footer: MIT Licensed | Copyright © 2018-present Evan You diff --git a/docs/ru/README.md b/docs/ru/README.md index 0d0176f32..1815f27fc 100644 --- a/docs/ru/README.md +++ b/docs/ru/README.md @@ -1,6 +1,6 @@ --- home: true -heroImage: /logo.png +heroImage: /favicon.png actionText: Введение → actionLink: /ru/guide/ footer: MIT Licensed | Copyright © 2018-present Evan You diff --git a/docs/zh/README.md b/docs/zh/README.md index 3a5884c68..27b3fc722 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -1,6 +1,6 @@ --- home: true -heroImage: /logo.png +heroImage: /favicon.png actionText: 起步 → actionLink: /zh/guide/ features: From e810806fdbb5afc40d13abf548acfd6d44738d33 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 18 Aug 2018 15:10:14 -0400 Subject: [PATCH 6/6] docs: fix scss example typo close #2272 --- docs/guide/css.md | 2 +- docs/ru/guide/css.md | 2 +- docs/zh/guide/css.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guide/css.md b/docs/guide/css.md index 50eead9e5..8b43e2a58 100644 --- a/docs/guide/css.md +++ b/docs/guide/css.md @@ -25,7 +25,7 @@ Then you can import the corresponding file types, or use them in `*.vue` files w ``` vue ``` diff --git a/docs/ru/guide/css.md b/docs/ru/guide/css.md index e724533cf..526d9500a 100644 --- a/docs/ru/guide/css.md +++ b/docs/ru/guide/css.md @@ -25,7 +25,7 @@ npm install -D stylus-loader stylus ``` vue ``` diff --git a/docs/zh/guide/css.md b/docs/zh/guide/css.md index c4c30f119..e767d601c 100644 --- a/docs/zh/guide/css.md +++ b/docs/zh/guide/css.md @@ -25,7 +25,7 @@ npm install -D stylus-loader stylus ``` vue ```