Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version flag to check jay version (#19) #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@ You can see the exact location of the cache by simply running the following line
> require('env-paths')('jay-repl').cache
```

## How to find out the jay version installed?

There is a cli flag `--version` that shows the jay version.

```bash
$ jay --version # jay version is 0.2.2
```

# Contributing

Expand Down
5 changes: 5 additions & 0 deletions source/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ if (semver.lt(process.version, '10.0.0')) {
process.exit(1)
}

if (process.argv[2] === '--version') {
console.log(c.magenta(`jay version is ${packageJson.version}`))
process.exit()
}

updateNotifier({
pkg: packageJson
}).notify()
Expand Down