Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit 711f997

Browse files
committed
move doc outside & code optimization
1 parent c7d76f4 commit 711f997

29 files changed

Lines changed: 146 additions & 1125 deletions

README.md

Lines changed: 14 additions & 508 deletions
Large diffs are not rendered by default.

bin/tcb.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,23 @@ const logSymbols = require('log-symbols')
55
const updateNotifier = require('update-notifier')
66
const pkg = require('../package.json')
77

8+
const isBeta = pkg.version.indexOf('-') > -1
9+
810
// 检查更新
911
const ONE_DAY = 86400000
12+
// Beta 版 1 个小时检查一次,稳定版 1 天检查一次
13+
const CheckInterval = isBeta ? 3600000 : ONE_DAY
14+
1015
const notifier = updateNotifier({
1116
pkg,
17+
distTag: isBeta ? 'beta': 'latest',
1218
// 检查更新间隔 1 天
13-
updateCheckInterval: ONE_DAY
19+
updateCheckInterval: CheckInterval
20+
})
21+
22+
notifier.notify({
23+
isGlobal: true
1424
})
15-
notifier.notify()
1625

1726
// 注册命令
1827
require('../lib')

0 commit comments

Comments
 (0)