refactor: use logger in package.js

This commit is contained in:
Clark Du 2018-08-31 20:32:30 +01:00
parent fe2dd22c14
commit c20034b994
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9

View File

@ -60,7 +60,7 @@ export default class Package extends EventEmitter {
} }
writePackage() { writePackage() {
consola.debug('Writing', this.packageJSON) this.logger.debug('Writing', this.packageJSON)
writeFileSync(this.packageJSON, JSON.stringify(this.packageObj, null, 2) + '\n') writeFileSync(this.packageJSON, JSON.stringify(this.packageObj, null, 2) + '\n')
} }
@ -172,7 +172,7 @@ export default class Package extends EventEmitter {
} }
dependencies[name] = `^${_pkg.version}` dependencies[name] = `^${_pkg.version}`
} catch (e) { } catch (e) {
consola.warn(e) this.logger.warn(e)
delete dependencies[name] delete dependencies[name]
} }
} }