windows-build-tools
Advanced tools
Comparing version 2.1.4 to 2.1.5
@@ -24,2 +24,4 @@ 'use strict'; | ||
var singleLineLogger = createSingleLineLogger(); | ||
var vccLastLines = ['Still waiting for installer log file...']; | ||
@@ -37,3 +39,3 @@ var pythonLastLines = ['Still waiting for installer log file...']; | ||
function install(cb) { | ||
log(chalk.green('Starting installation...')); | ||
log(chalk.green('\nStarting installation...')); | ||
@@ -45,2 +47,3 @@ launchInstaller().then(function () { | ||
}).then(function (paths) { | ||
logStatus(); | ||
stopLog(); | ||
@@ -58,2 +61,7 @@ | ||
function logStatus() { | ||
var updatedLog = ['Visual Studio Build Tools:'].concat(_toConsumableArray(vccLastLines), ['Python 2:'], _toConsumableArray(pythonLastLines)); | ||
singleLineLogger(updatedLog.join('\n')); | ||
} | ||
function launchLog() { | ||
@@ -64,9 +72,5 @@ if (!shouldLog) return; | ||
log('This will likely take some time - please be patient!\n'); | ||
log('Status from the installers:'); | ||
log('Status from the installers:'); | ||
var singleLineLogger = createSingleLineLogger(); | ||
lastLinesInterval = setInterval(function () { | ||
var updatedLog = ['Visual Studio Build Tools:'].concat(_toConsumableArray(vccLastLines), ['Python 2:'], _toConsumableArray(pythonLastLines)); | ||
singleLineLogger(updatedLog.join('\n')); | ||
}, 2500); | ||
lastLinesInterval = setInterval(logStatus, 1000); | ||
} | ||
@@ -84,2 +88,6 @@ | ||
tailer.on('lastLines', function (lastLines) { | ||
vccLastLines = lastLines; | ||
}); | ||
tailer.on('exit', function (result, details) { | ||
@@ -117,2 +125,6 @@ debug('Install: Build tools tailer exited'); | ||
tailer.on('lastLines', function (lastLines) { | ||
pythonLastLines = lastLines; | ||
}); | ||
tailer.on('exit', function (result, details) { | ||
@@ -119,0 +131,0 @@ debug('python tailer exited'); |
{ | ||
"name": "windows-build-tools", | ||
"version": "2.1.4", | ||
"version": "2.1.5", | ||
"description": "Install C++ Build Tools for Windows using npm", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -13,2 +13,4 @@ 'use strict' | ||
const singleLineLogger = createSingleLineLogger() | ||
let vccLastLines = [ 'Still waiting for installer log file...' ] | ||
@@ -26,3 +28,3 @@ let pythonLastLines = [ 'Still waiting for installer log file...' ] | ||
function install (cb) { | ||
log(chalk.green('Starting installation...')) | ||
log(chalk.green('\nStarting installation...')) | ||
@@ -33,2 +35,3 @@ launchInstaller() | ||
.then((paths) => { | ||
logStatus() | ||
stopLog() | ||
@@ -47,2 +50,7 @@ | ||
function logStatus () { | ||
const updatedLog = [ 'Visual Studio Build Tools:', ...vccLastLines, 'Python 2:', ...pythonLastLines ] | ||
singleLineLogger(updatedLog.join('\n')) | ||
} | ||
function launchLog () { | ||
@@ -53,9 +61,5 @@ if (!shouldLog) return | ||
log('This will likely take some time - please be patient!\n') | ||
log('Status from the installers:') | ||
log('Status from the installers:') | ||
const singleLineLogger = createSingleLineLogger() | ||
lastLinesInterval = setInterval(() => { | ||
const updatedLog = [ 'Visual Studio Build Tools:', ...vccLastLines, 'Python 2:', ...pythonLastLines ] | ||
singleLineLogger(updatedLog.join('\n')) | ||
}, 2500) | ||
lastLinesInterval = setInterval(logStatus, 1000) | ||
} | ||
@@ -73,2 +77,6 @@ | ||
tailer.on('lastLines', (lastLines) => { | ||
vccLastLines = lastLines | ||
}) | ||
tailer.on('exit', (result, details) => { | ||
@@ -106,2 +114,6 @@ debug('Install: Build tools tailer exited') | ||
tailer.on('lastLines', (lastLines) => { | ||
pythonLastLines = lastLines | ||
}) | ||
tailer.on('exit', (result, details) => { | ||
@@ -108,0 +120,0 @@ debug('python tailer exited') |
166497
1448