Skip to content

Commit ee7e8b8

Browse files
authored
chore(docs): update Zeit references to Vercel (bootstrap-vue#5208)
Co-authored-by: Jacob Müller
1 parent 6f84fb9 commit ee7e8b8

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

docs/components/footer.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444

4545
<hr>
4646

47-
<template v-if="isZeitNow && false">
47+
<template v-if="isVercel && false">
4848
<p class="mb-4 text-center">
4949
<strong class="d-block mx-auto mb-2">Hosting provided by</strong>
50-
<a href="https://zeit.co/?utm_campaign=bootstrap-vue" target="_blank" rel="noopener">
50+
<a href="https://vercel.com/?utm_campaign=bootstrap-vue" target="_blank" rel="noopener">
5151
<svg
5252
xmlns="http://www.w3.org/2000/svg"
5353
role="img"
@@ -98,12 +98,12 @@
9898
Currently v{{ version }}. Code licensed
9999
<a href="https://github.com/bootstrap-vue/bootstrap-vue/blob/master/LICENSE" target="_blank">MIT</a>.
100100
Docs generated with
101-
<a href="https://nuxtjs.org/" target="_blank">Nuxt.js</a><template v-if="!isNetlify && !isZeitNow">.</template>
101+
<a href="https://nuxtjs.org/" target="_blank">Nuxt.js</a><template v-if="!isNetlify && !isVercel">.</template>
102102
<template v-if="isNetlify">
103103
and proudly hosted on <a href="https://www.netlify.com" target="_blank">Netlify</a>.
104104
</template>
105-
<template v-else-if="isZeitNow">
106-
and proudly hosted on <a href="https://zeit.co/?utm_campaign=bootstrap-vue" target="_blank">Zeit</a>.
105+
<template v-else-if="isVercel">
106+
and proudly hosted on <a href="https://vercel.com/?utm_campaign=bootstrap-vue" target="_blank">Vercel</a>.
107107
</template>
108108
</p>
109109
</b-container>
@@ -146,8 +146,8 @@ export default {
146146
isNetlify() {
147147
return Boolean(process.env.NETLIFY)
148148
},
149-
isZeitNow() {
150-
return Boolean(process.env.ZEIT_NOW)
149+
isVercel() {
150+
return Boolean(process.env.VERCEL_NOW)
151151
}
152152
}
153153
}

docs/components/header.vue

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,30 +199,35 @@ export default {
199199
isNetlify() {
200200
return Boolean(process.env.NETLIFY)
201201
},
202-
isZeitNow() {
203-
return Boolean(process.env.ZEIT_NOW)
202+
isVercel() {
203+
return Boolean(process.env.VERCEL_NOW)
204204
},
205205
branchName() {
206-
return this.isZeitNow ? process.env.ZEIT_BRANCH || '' : ''
206+
// Netlify doesn't support providing the branch name
207+
return this.isVercel ? process.env.VERCEL_BRANCH || '' : ''
207208
},
208209
isDev() {
209210
// In our case, `production` is the dev branch preview (Netlify)
210211
return (
211212
(this.isNetlify && process.env.NETLIFY_CONTEXT === 'production') ||
212-
(this.isZeitNow && this.branchName === 'dev')
213+
(this.isVercel && this.branchName === 'dev')
213214
)
214215
},
215216
isPR() {
216217
return (
217218
(this.isNetlify && process.env.PULL_REQUEST && process.env.REVIEW_ID) ||
218-
(this.isZeitNow && !this.isDev && this.branchName !== 'master')
219+
(this.isVercel && !this.isDev && this.branchName !== 'master')
219220
)
220221
},
221222
prId() {
223+
// Vercel doesn't currently support returning the PR number
224+
// `REVIEW_ID` is provided by Netlify
222225
return this.isPR ? process.env.REVIEW_ID : ''
223226
},
224227
dropdownText() {
228+
// Dropdown button text
225229
if (this.isPR) {
230+
// Vercel doesn't currently support returning the PR number
226231
return this.prId ? `Pull #${this.prId}` : 'Pull Request'
227232
} else if (this.isLocal) {
228233
return 'Local Copy'

docs/nuxt.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,20 @@ module.exports = {
151151
PULL_REQUEST: process.env.NETLIFY ? process.env.PULL_REQUEST : null,
152152
// - If the previous is `true`, this will be the PR number
153153
REVIEW_ID: process.env.NETLIFY && process.env.PULL_REQUEST ? process.env.REVIEW_ID : null,
154-
// ENV vars provided by Zeit Now build
154+
// ENV vars provided by Vercel/Zeit Now build
155155
// https://zeit.co/docs/v2/build-step#system-environment-variables
156156
// - `true` if on Zeit Now (dev or PR)
157-
ZEIT_NOW: process.env.NOW_GITHUB_DEPLOYMENT,
157+
VERCEL_NOW: process.env.VERCEL_GITHUB_DEPLOYMENT || process.env.NOW_GITHUB_DEPLOYMENT,
158158
// - The branch name used for the deploy (i.e. `dev`, `master`, `patch-1`, etc)
159-
ZEIT_BRANCH: process.env.NOW_GITHUB_COMMIT_REF,
159+
VERCEL_BRANCH: process.env.VERCEL_GITHUB_COMMIT_REF || process.env.NOW_GITHUB_COMMIT_REF,
160160
// - The Commit SHA hash
161-
ZEIT_COMMIT_SHA: process.env.NOW_GITHUB_COMMIT_SHA,
161+
VERCEL_COMMIT_SHA: process.env.VERCEL_GITHUB_COMMIT_SHA || process.env.NOW_GITHUB_COMMIT_SHA,
162162
// - The deployment URL
163-
ZEIT_URL: process.env.NOW_URL,
163+
VERCEL_URL: process.env.VERCEL_URL || process.env.NOW_URL,
164164
// - The Github Organization (ie. bootstrap-vue)
165-
ZEIT_GITHUB_ORG: process.env.NOW_GITHUB_ORG,
165+
VERCEL_GITHUB_ORG: process.env.VERCEL_GITHUB_ORG || process.env.NOW_GITHUB_ORG,
166166
// - The repo is the organization (i.e. bootstrap-vue)
167-
ZEIT_GITHUB_REPO: process.env.NOW_GITHUB_REPO
167+
VERCEL_GITHUB_REPO: process.env.VERCEL_GITHUB_REPO || process.env.NOW_GITHUB_REPO
168168
},
169169

170170
build: {

0 commit comments

Comments
 (0)