Skip to content

Commit

Permalink
feat: cli 增加更新提示
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Jan 22, 2023
1 parent 8909566 commit 09b56b9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"rimraf": "^3.0.2",
"spinnies": "^0.5.1",
"tailchat-server-sdk": "^0.0.12",
"update-notifier": "5.1.0",
"yargs": "^17.4.0"
},
"devDependencies": {
Expand All @@ -66,6 +67,7 @@
"@types/node": "16.11.7",
"@types/react": "18.0.20",
"@types/spinnies": "^0.5.0",
"@types/update-notifier": "^6.0.1",
"@types/yargs": "^17.0.10",
"cross-env": "^7.0.3",
"tailchat-shared": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions apps/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './update';
import yargs from 'yargs';
import { createCommand } from './commands/create';
import { connectCommand } from './commands/connect';
Expand Down
7 changes: 7 additions & 0 deletions apps/cli/src/update.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import updateNotifier from 'update-notifier';
const packageJson = require('../package.json');

updateNotifier({
pkg: packageJson,
shouldNotifyInNpmScript: true,
}).notify();
17 changes: 16 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 09b56b9

Please sign in to comment.