Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
.www.
wechaty
提交
bb3dfeb4
W
wechaty
项目概览
.www.
/
wechaty
与 Fork 源项目一致
Fork自
wechaty / wechaty
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
wechaty
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bb3dfeb4
编写于
4月 19, 2017
作者:
Huan (李卓桓)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update(module): add default export
上级
87316e16
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
17 addition
and
10 deletion
+17
-10
README.md
README.md
+1
-1
bin/doctor.ts
bin/doctor.ts
+3
-6
bin/io-client.ts
bin/io-client.ts
+2
-2
bin/version.ts
bin/version.ts
+1
-1
src/config.ts
src/config.ts
+2
-0
src/doctor.ts
src/doctor.ts
+2
-0
src/io-client.ts
src/io-client.ts
+2
-0
src/io.ts
src/io.ts
+2
-0
src/wechaty.ts
src/wechaty.ts
+2
-0
未找到文件。
README.md
浏览文件 @
bb3dfeb4
...
@@ -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
}
`
))
...
...
bin/doctor.ts
浏览文件 @
bb3dfeb4
...
@@ -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
()
...
...
bin/io-client.ts
浏览文件 @
bb3dfeb4
...
@@ -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
=
`
| __ __ _ _
| __ __ _ _
...
...
bin/version.ts
浏览文件 @
bb3dfeb4
...
@@ -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
())
src/config.ts
浏览文件 @
bb3dfeb4
...
@@ -231,3 +231,5 @@ if (/verbose|silly/i.test(logLevel)) {
...
@@ -231,3 +231,5 @@ if (/verbose|silly/i.test(logLevel)) {
})
})
})
})
}
}
export
default
Config
src/doctor.ts
浏览文件 @
bb3dfeb4
...
@@ -77,3 +77,5 @@ export class Doctor {
...
@@ -77,3 +77,5 @@ export class Doctor {
})
})
}
}
}
}
export
default
Doctor
src/io-client.ts
浏览文件 @
bb3dfeb4
...
@@ -269,3 +269,5 @@ export class IoClient {
...
@@ -269,3 +269,5 @@ export class IoClient {
}
}
}
}
export
default
IoClient
src/io.ts
浏览文件 @
bb3dfeb4
...
@@ -412,3 +412,5 @@ export class Io {
...
@@ -412,3 +412,5 @@ export class Io {
}
}
}
}
export
default
Io
src/wechaty.ts
浏览文件 @
bb3dfeb4
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录