提交 bb3dfeb4 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

update(module): add default export

上级 87316e16
......@@ -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}`))
......
......@@ -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()
......
......@@ -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 = `
| __ __ _ _
......
......@@ -7,7 +7,7 @@
*
*/
import { Wechaty } from '../src/wechaty'
import Wechaty from '../src/wechaty'
const w = Wechaty.instance()
console.log(w.version())
......@@ -231,3 +231,5 @@ if (/verbose|silly/i.test(logLevel)) {
})
})
}
export default Config
......@@ -77,3 +77,5 @@ export class Doctor {
})
}
}
export default Doctor
......@@ -269,3 +269,5 @@ export class IoClient {
}
}
export default IoClient
......@@ -412,3 +412,5 @@ export class Io {
}
}
export default Io
......@@ -475,3 +475,5 @@ export class Wechaty extends EventEmitter implements Sayable {
})
}
}
export default Wechaty
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册