diff --git a/README.md b/README.md index 23b92232e3bf756231947134c75afa0ce1c09d5b..924053dc7cbc8be6d79778171062b0630e250fef 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Wechaty is a Bot Framework for Wechat **Personal** Account which can help you cr # The World's Shortest ChatBot Code: 6 lines of JavaScript ```javascript -const { Wechaty } = require('wechaty') +const { Wechaty } = require('wechaty') // import Wechaty from 'wechaty' Wechaty.instance() // Singleton .on('scan', (url, code) => console.log(`Scan QR Code to login: ${code}\n${url}`)) diff --git a/bin/doctor.ts b/bin/doctor.ts index 40180efd6a88d74b1ffdca8b05598bffcdb34ff7..e50d30cb6960d29d91872752c0e9ec43568d8607 100755 --- a/bin/doctor.ts +++ b/bin/doctor.ts @@ -9,12 +9,9 @@ import * as os from 'os' -import { - Config, -} from '../src/config' -import { Wechaty } from '../src/wechaty' - -import { Doctor } from '../src/doctor' +import Config from '../src/config' +import Doctor from '../src/doctor' +import Wechaty from '../src/wechaty' const wechaty = Wechaty.instance() const doctor = new Doctor() diff --git a/bin/io-client.ts b/bin/io-client.ts index ee201493aae36d73d0764916281c95d30c8be119..b83b635d6fdf2a6d70d94028d7820ead8a65d84c 100755 --- a/bin/io-client.ts +++ b/bin/io-client.ts @@ -10,9 +10,9 @@ import { Config, log, -} from '../src/config' +} from '../src/config' -import { IoClient } from '../src/io-client' +import IoClient from '../src/io-client' const welcome = ` | __ __ _ _ diff --git a/bin/version.ts b/bin/version.ts index 46838b6ac4835a147c13ad526eb3e02afad34752..be64c673f02c072ec3edf61855db568ea1d4f84a 100755 --- a/bin/version.ts +++ b/bin/version.ts @@ -7,7 +7,7 @@ * */ -import { Wechaty } from '../src/wechaty' +import Wechaty from '../src/wechaty' const w = Wechaty.instance() console.log(w.version()) diff --git a/src/config.ts b/src/config.ts index e25123dcfddba8efc782e3382d6e65d7d475ca12..e940175799b36f336a4fe774a3211189c0354670 100644 --- a/src/config.ts +++ b/src/config.ts @@ -231,3 +231,5 @@ if (/verbose|silly/i.test(logLevel)) { }) }) } + +export default Config diff --git a/src/doctor.ts b/src/doctor.ts index 6634b2eeeb76868c01a6dd546efa5100a5198c3d..b156a75b52d4ee3c521da86e998e8b7d68a933dd 100644 --- a/src/doctor.ts +++ b/src/doctor.ts @@ -77,3 +77,5 @@ export class Doctor { }) } } + +export default Doctor diff --git a/src/io-client.ts b/src/io-client.ts index 8d3cc5443c6c51bba59b43fd87b5960ceb02c47a..7a197122d898425b5cae3c6729dffa8848484097 100644 --- a/src/io-client.ts +++ b/src/io-client.ts @@ -269,3 +269,5 @@ export class IoClient { } } + +export default IoClient diff --git a/src/io.ts b/src/io.ts index eac46ce95d3cafe19809814c1f4172c22bfe5bb3..0f01455693e362ca941f1e8f955a5539b0d56d87 100644 --- a/src/io.ts +++ b/src/io.ts @@ -412,3 +412,5 @@ export class Io { } } + +export default Io diff --git a/src/wechaty.ts b/src/wechaty.ts index 0eba17875387363e1f46d3ced39857573f2b5d8a..ea8e43fbc4da0e36fced30cd33702923d85f9fbc 100644 --- a/src/wechaty.ts +++ b/src/wechaty.ts @@ -475,3 +475,5 @@ export class Wechaty extends EventEmitter implements Sayable { }) } } + +export default Wechaty