Skip to content

Commit bf785ae

Browse files
committed
Fix for setup script in Windows (#2480)
@mensae's work on fixing the setup script for Windows environments
1 parent 726e96e commit bf785ae

File tree

3 files changed

+289
-105
lines changed

3 files changed

+289
-105
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const fs = require('fs');
2+
3+
module.exports = JSON.parse(fs.readFileSync('package.json', 'utf8'));

internals/scripts/helpers/progress.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
'use strict';
2-
31
const readline = require('readline');
42

53
/**
64
* Adds an animated progress indicator
75
*
86
* @param {string} message The message to write next to the indicator
9-
* @param {number} amountOfDots The amount of dots you want to animate
7+
* @param {number} [amountOfDots=3] The amount of dots you want to animate
108
*/
11-
function animateProgress(message, amountOfDots) {
12-
if (typeof amountOfDots !== 'number') {
13-
amountOfDots = 3;
14-
}
15-
9+
function animateProgress(message, amountOfDots = 3) {
1610
let i = 0;
17-
return setInterval(function() {
11+
return setInterval(() => {
1812
readline.cursorTo(process.stdout, 0);
1913
i = (i + 1) % (amountOfDots + 1);
2014
const dots = new Array(i + 1).join('.');

0 commit comments

Comments
 (0)