Skip to content

Commit f23664e

Browse files
committed
[skip ci] docs(deploy): add progress indicators to deployDocs script
1 parent 0b6db5d commit f23664e

File tree

3 files changed

+38
-9
lines changed

3 files changed

+38
-9
lines changed

deployDocs.js

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
const execa = require('execa')
2+
const List = require('terminal-tasks')
3+
const list = new List([
4+
'Build With Vuepress',
5+
'Git Init',
6+
'Git Add',
7+
'Git Commit',
8+
'Git Push'
9+
])
210
const deploy = () =>
311
new Promise(async resolve => {
412
// Build docs
5-
await execa('yarn', ['docs:build'], {
6-
stdio: 'inherit'
7-
})
13+
await execa('yarn', ['docs:build'], {})
14+
list.next()
815

916
// Push to github
1017
await execa('git', ['init'], {
11-
stdio: 'inherit',
1218
cwd: './docs/.vuepress/dist'
1319
})
20+
list.next()
21+
1422
await execa('git', ['add', '-A'], {
15-
stdio: 'inherit',
1623
cwd: './docs/.vuepress/dist'
1724
})
25+
list.next()
26+
1827
await execa('git', ['commit', '-m', 'deploy'], {
19-
stdio: 'inherit',
2028
cwd: './docs/.vuepress/dist'
2129
})
30+
list.next()
31+
2232
await execa(
2333
'git',
2434
[
@@ -28,12 +38,11 @@ const deploy = () =>
2838
'master:gh-pages'
2939
],
3040
{
31-
cwd: './docs/.vuepress/dist',
32-
stdio: 'inherit'
41+
cwd: './docs/.vuepress/dist'
3342
}
3443
)
3544
resolve()
3645
})
3746
deploy().then(() => {
38-
console.log('Deploy Complete')
47+
list.complete('Deploy Complete!')
3948
})

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"jest": "^23.5.0",
6464
"lnk": "^1.1.0",
6565
"rimraf": "^2.6.2",
66+
"terminal-tasks": "^0.0.4",
6667
"typescript": "^3.0.1",
6768
"vue": "2.5.17",
6869
"vuepress": "^0.14.2"

yarn.lock

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10549,6 +10549,18 @@ ora@^2.1.0:
1054910549
strip-ansi "^4.0.0"
1055010550
wcwidth "^1.0.1"
1055110551

10552+
ora@^3.0.0:
10553+
version "3.0.0"
10554+
resolved "https://registry.yarnpkg.com/ora/-/ora-3.0.0.tgz#8179e3525b9aafd99242d63cc206fd64732741d0"
10555+
integrity sha512-LBS97LFe2RV6GJmXBi6OKcETKyklHNMV0xw7BtsVn2MlsgsydyZetSCbCANr+PFLmDyv4KV88nn0eCKza665Mg==
10556+
dependencies:
10557+
chalk "^2.3.1"
10558+
cli-cursor "^2.1.0"
10559+
cli-spinners "^1.1.0"
10560+
log-symbols "^2.2.0"
10561+
strip-ansi "^4.0.0"
10562+
wcwidth "^1.0.1"
10563+
1055210564
original@>=0.0.5:
1055310565
version "1.0.2"
1055410566
resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f"
@@ -13727,6 +13739,13 @@ term-size@^1.2.0:
1372713739
dependencies:
1372813740
execa "^0.7.0"
1372913741

13742+
terminal-tasks@^0.0.4:
13743+
version "0.0.4"
13744+
resolved "https://registry.yarnpkg.com/terminal-tasks/-/terminal-tasks-0.0.4.tgz#97b9cf32fa4d6c04555ca1a8558d71ae8479055d"
13745+
integrity sha512-wy4BGUNixau3liO5ZNIwXfAnD9IQdlmhtF+Klg/tH8PKWWE7msrmgMH0i8C56i85/U7mLEYZn051QsnCxfgLPQ==
13746+
dependencies:
13747+
ora "^3.0.0"
13748+
1373013749
terminate@^2.1.0:
1373113750
version "2.1.0"
1373213751
resolved "https://registry.yarnpkg.com/terminate/-/terminate-2.1.0.tgz#a87ee424be01a1d28f2f301045043a5bcd679a05"

0 commit comments

Comments
 (0)