added log module
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user