Skip to content

Commit 9229887

Browse files
committed
fix(docs): remove Vercel references
1 parent f682e53 commit 9229887

12 files changed

+16
-116
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
.now/
21
.nuxt/
3-
.vercel/
42
coverage/
53
dist/
64
docs-dist/

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
.idea/
2-
.now/
32
.nuxt/
4-
.vercel/
53
.vscode/
64
coverage/
75
coverage-vue3/

.prettierignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
.now/
21
.nuxt/
3-
.vercel/
42
coverage/
53
dist/
64
docs-dist/

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,6 @@ This project exists thanks to all the people who contribute. [[Contribute]](CONT
9595

9696
<a href="https://github.com/bootstrap-vue/bootstrap-vue/graphs/contributors"><img src="https://opencollective.com/bootstrap-vue/contributors.svg?width=890"></a>
9797

98-
<h2 align="center">Partners</h2>
99-
100-
<p align="center">
101-
<a href="https://vercel.com/?utm_source=bootstrapvue" target="_blank" rel="noopener"><img src="https://github.com/bootstrap-vue/bootstrap-vue/raw/master/static/powered-by-vercel.svg" width="175" alt="Powered by Vercel"></a>
102-
</p>
103-
10498
<h2 align="center">License</h2>
10599

106100
Released under the MIT [License](./LICENSE). Copyright (c) BootstrapVue.

docs/assets/powered-by-vercel.svg

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/assets/vercel.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/components/footer.vue

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,8 @@
5353
Currently v{{ version }}. Code licensed
5454
<a href="https://github.com/bootstrap-vue/bootstrap-vue/blob/master/LICENSE" target="_blank">MIT</a>.
5555
Docs generated with
56-
<a href="https://nuxtjs.org/" target="_blank">Nuxt.js</a><template v-if="!isVercel">.</template>
57-
<template v-else-if="isVercel">
58-
and proudly hosted on <a href="https://vercel.com/?utm_source=bootstrapvue" target="_blank">Vercel</a>.
59-
</template>
56+
<a href="https://nuxtjs.org/" target="_blank">Nuxt.js</a>.
6057
</p>
61-
62-
<template v-if="isVercel">
63-
<p class="mt-3 text-center">
64-
<a href="https://vercel.com/?utm_source=bootstrapvue" target="_blank" rel="noopener">
65-
<img src="~assets/powered-by-vercel.svg" width="159" height="33">
66-
</a>
67-
</p>
68-
</template>
6958
</b-container>
7059
</footer>
7160
</template>
@@ -85,11 +74,6 @@ export default {
8574
},
8675
data() {
8776
return { version }
88-
},
89-
computed: {
90-
isVercel() {
91-
return Boolean(process.env.VERCEL_NOW)
92-
}
9377
}
9478
}
9579
</script>

docs/components/header.vue

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,10 @@
4747
toggle-class="mr-md-2"
4848
right
4949
>
50-
<template v-if="isPR || isDev || isLocal">
51-
<b-dropdown-item v-if="isPR" active href="/">
52-
Pull Request - {{ branchName }}
53-
</b-dropdown-item>
54-
<b-dropdown-item v-else-if="isLocal" active href="/">
50+
<template v-if="isLocal">
51+
<b-dropdown-item active href="/">
5552
Local copy
5653
</b-dropdown-item>
57-
<b-dropdown-item :active="isDev" :href="devURL" rel="nofollow">
58-
Development
59-
</b-dropdown-item>
6054
<b-dropdown-item :href="prodURL">
6155
Latest (v{{ version }})
6256
</b-dropdown-item>
@@ -183,35 +177,22 @@ export default {
183177
devURL() {
184178
return BASE_URL_DEV
185179
},
186-
isVercel() {
187-
return Boolean(process.env.VERCEL_NOW)
188-
},
189-
branchName() {
190-
return this.isVercel ? process.env.VERCEL_BRANCH || '' : ''
191-
},
192-
isDev() {
193-
// In our case, `production` is the dev branch preview (Vercel)
194-
return this.isVercel && this.branchName === 'dev'
195-
},
196-
isPR() {
197-
return this.isVercel && !this.isDev && this.branchName !== 'master'
198-
},
199180
dropdownText() {
200-
// Dropdown button text
201-
if (this.isPR) {
202-
// Vercel doesn't currently support returning the PR number
203-
return 'Pull Request'
204-
} else if (this.isLocal) {
181+
if (this.isLocal) {
205182
return 'Local Copy'
206-
} else if (this.isDev) {
207-
return 'Development'
208183
}
184+
209185
return `v${version}`
210186
}
211187
},
212188
mounted() {
213-
const host = window.location.host || ''
214-
this.isLocal = host === 'localhost' || host === '127.0.0.1'
189+
this.isLocal = this.isLocalHost()
190+
},
191+
methods: {
192+
isLocalHost() {
193+
const host = window.location.host || ''
194+
return host === 'localhost' || host === '127.0.0.1'
195+
}
215196
}
216197
}
217198
</script>

docs/nuxt.config.js

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ const RX_CODE_FILENAME = /^\/\/ ([\w,\s-]+\.[A-Za-z]{1,4})\n/m
2323
const ANCHOR_LINK_HEADING_LEVELS = [2, 3, 4, 5]
2424

2525
// Determine if documentation generation is published production docs
26-
// Must be from 'bootstrap-vue/bootstrap-vue' repo 'master' branch
27-
const IS_PROD_DOCS =
28-
process.env.VERCEL_GITHUB_ORG === 'bootstrap-vue' &&
29-
process.env.VERCEL_GITHUB_REPO === 'bootstrap-vue' &&
30-
process.env.VERCEL_GITHUB_COMMIT_REF === 'master'
26+
const IS_PROD_DOCS = !!process.env.GITHUB_ACTIONS
3127

3228
// --- Utility methods ---
3329

@@ -160,20 +156,8 @@ module.exports = {
160156
modern: 'client',
161157

162158
env: {
163-
// ENV vars provided by Vercel/Zeit Now build
164-
// https://zeit.co/docs/v2/build-step#system-environment-variables
165-
// - `true` if on Zeit Now (dev or PR)
166-
VERCEL_NOW: process.env.VERCEL_GITHUB_DEPLOYMENT,
167-
// - The branch name used for the deploy (i.e. `dev`, `master`, `patch-1`, etc.)
168-
VERCEL_BRANCH: process.env.VERCEL_GITHUB_COMMIT_REF,
169-
// - The Commit SHA hash
170-
VERCEL_COMMIT_SHA: process.env.VERCEL_GITHUB_COMMIT_SHA,
171-
// - The deployment URL
172-
VERCEL_URL: process.env.VERCEL_URL,
173-
// - The Github Organization (ie. bootstrap-vue)
174-
VERCEL_GITHUB_ORG: process.env.VERCEL_GITHUB_ORG,
175-
// - The repo is the organization (i.e. bootstrap-vue)
176-
VERCEL_GITHUB_REPO: process.env.VERCEL_GITHUB_REPO
159+
// ENV vars provided by CI/CD system
160+
GITHUB_ACTIONS: !!process.env.GITHUB_ACTIONS
177161
},
178162

179163
build: {
@@ -313,6 +297,7 @@ module.exports = {
313297
if (!IS_PROD_DOCS) {
314298
return false
315299
}
300+
316301
return {
317302
hostname: BASE_URL,
318303
// Exclude any redirect pages from sitemaps

docs/pages/index.vue

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -363,21 +363,6 @@
363363
</b-button>
364364

365365
<BVContributors></BVContributors>
366-
367-
<hr style="withd: 90%">
368-
369-
<div class="text-center mb-n4" aria-labeledby="parners-heading">
370-
<h3 id="partners-heading" class="mx-auto mt-4">Partners</h3>
371-
<p class="text-muted mb-4"><b>BootstrapVue</b> would like to thank our partners</p>
372-
<a
373-
href="https://vercel.com/?utm_source=bootstrapvue"
374-
target="_blank"
375-
rel="noopener follow"
376-
class="bvd-partner d-inline-block p-1"
377-
>
378-
<b-img-lazy src="~/assets/vercel.svg" alt="Vercel logo"></b-img-lazy>
379-
</a>
380-
</div>
381366
</b-container>
382367
</section>
383368

now.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

static/powered-by-vercel.svg

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)