added log module

This commit is contained in:
2018-05-02 22:05:05 +03:00
parent c89833e80f
commit 3b26ae8b08
9 changed files with 124 additions and 77 deletions

View File

@@ -6,9 +6,8 @@ const got = require('got');
const unzip = require('unzip-stream');
const tar = require('tar');
const ProgressBar = require('progress');
const colors = require('ansi-colors');
const log = require('fancy-log');
const fse = require('fs-extra');
const Log = require('./log');
class System {
@@ -51,7 +50,7 @@ class Sdk {
constructor(name, version) {
this.name = name;
this.tag = colors.green(`[${name}]`);
this.log = Log(name);
this.version = version;
this.path = Sdk.path(name, version);
}
@@ -76,8 +75,7 @@ class Sdk {
}
prepare(strip=1) {
log(this.tag, `version: ${colors.magenta(this.version)}`);
this.log.i('version: *%s*', this.version);
if (this.prepared) {
return Promise.resolve();
} else {