From b9f9e71b9fc76120d2a95e3d4f4783e850a67fc8 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Fri, 25 Nov 2016 16:15:40 +0100 Subject: [PATCH] Neat loading animation for looking on GitHub --- bin/now-deploy.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/bin/now-deploy.js b/bin/now-deploy.js index fd57175..848aa9a 100755 --- a/bin/now-deploy.js +++ b/bin/now-deploy.js @@ -210,8 +210,23 @@ async function sync(token) { let repo if (isRepoPath(rawPath)) { - console.log('> Didn\'t find directory. Searching on GitHub...') + process.stdout.write('> Didn\'t find directory. Searching on GitHub') + + let dotCount = 0 + + const dots = setInterval(() => { + dotCount++ + process.stdout.write('.') + + if (dotCount === 20) { + clearInterval(dots) + } + }, 500) + repo = await onGitHub(rawPath, debug) + + clearInterval(dots) + process.stdout.write('\n') } if (repo) {