提交 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 ...@@ -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 # The World's Shortest ChatBot Code: 6 lines of JavaScript
```javascript ```javascript
const { Wechaty } = require('wechaty') const { Wechaty } = require('wechaty') // import Wechaty from 'wechaty'
Wechaty.instance() // Singleton Wechaty.instance() // Singleton
.on('scan', (url, code) => console.log(`Scan QR Code to login: ${code}\n${url}`)) .on('scan', (url, code) => console.log(`Scan QR Code to login: ${code}\n${url}`))
......
...@@ -9,12 +9,9 @@ ...@@ -9,12 +9,9 @@
import * as os from 'os' import * as os from 'os'
import { import Config from '../src/config'
Config, import Doctor from '../src/doctor'
} from '../src/config' import Wechaty from '../src/wechaty'
import { Wechaty } from '../src/wechaty'
import { Doctor } from '../src/doctor'
const wechaty = Wechaty.instance() const wechaty = Wechaty.instance()
const doctor = new Doctor() const doctor = new Doctor()
......
...@@ -12,7 +12,7 @@ import { ...@@ -12,7 +12,7 @@ import {
log, log,
} from '../src/config' } from '../src/config'
import { IoClient } from '../src/io-client' import IoClient from '../src/io-client'
const welcome = ` const welcome = `
| __ __ _ _ | __ __ _ _
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
*/ */
import { Wechaty } from '../src/wechaty' import Wechaty from '../src/wechaty'
const w = Wechaty.instance() const w = Wechaty.instance()
console.log(w.version()) console.log(w.version())
...@@ -231,3 +231,5 @@ if (/verbose|silly/i.test(logLevel)) { ...@@ -231,3 +231,5 @@ if (/verbose|silly/i.test(logLevel)) {
}) })
}) })
} }
export default Config
...@@ -77,3 +77,5 @@ export class Doctor { ...@@ -77,3 +77,5 @@ export class Doctor {
}) })
} }
} }
export default Doctor
...@@ -269,3 +269,5 @@ export class IoClient { ...@@ -269,3 +269,5 @@ export class IoClient {
} }
} }
export default IoClient
...@@ -412,3 +412,5 @@ export class Io { ...@@ -412,3 +412,5 @@ export class Io {
} }
} }
export default Io
...@@ -475,3 +475,5 @@ export class Wechaty extends EventEmitter implements Sayable { ...@@ -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.
先完成此消息的编辑!
想要评论请 注册