1.0.2 • Published 5 months ago
check-cli-update v1.0.2
check-cli-update
for CLI developer, you can add this function to remind user to update the command in time.
Install
npm i check-cli-update
Usage
import { checkUpdate } from "check-cli-update"
checkUpdate({
cwd: "your cli folder location",
})
take @homy/gito-core
for example, if the version you use is 0.0.1
,you will see a message like
The latest version of @homy/gito-core is 1.0.0 and you have 0.0.1. Update it now: npm i -g @homy/gito-core
also you can custom the tips by customTips
callback and cwd by cwd
option
import { checkUpdate } from "check-cli-update"
checkUpdate({
customTips({
latestVersion: string
curVersion: string
pkgName: string
}) {},
cwd:'xxx'
})
1.0.2
5 months ago
1.0.1
5 months ago
1.0.0
10 months ago
1.0.0-beta.5
10 months ago
1.0.0-beta.4
10 months ago
1.0.0-beta.3
10 months ago
1.0.0-beta.2
10 months ago