Closed TalAter closed 6 years ago
would love to tackle this
Go for it!
Got it working - Right now the updateNotifier function is sitting after all the require statements in the global scope of index.js. Is that appropriate? Should I create a program method for the notification? Here is the snippet below:
const updateNotifier = require('update-notifier');
const pkg = require('../package.json');
updateNotifier({ pkg }).notify();
program.on('--help', () => {
I think placing it in an external file as you suggest might be more elegant.
Pull request added at https://github.com/DAVFoundation/dav-cli/pull/18
Thank you for your help :heart:
What is this project?
DAV (Decentralized Autonomous Vehicles) is a new non-profit foundation working to build an open-source infrastructure for autonomous vehicles (cars, drones, trucks, robots, and all the service providers around them) to communicate and transact with each other over blockchain.
DAV CLI
The DAV CLI (command-line interface) tool makes developing applications and solutions that interact with DAV a much more pleasant experience. It allows developers to run fully functioning blockchains on their computer with one command, generate secure keys, and more.
How you can help
The Issue
The DAV CLI is usually installed globally on the user's machine. Since there is no good way for users to know when a new version is released, we would like to show them a message when they are using an old version of the CLI.
Luckily, there is a tool that enables this very easily π update-notifier.
Add the simple integration with update-notifier to the CLI's index.js file.
Contributing to DAV CLI
up-for-grabs
and not labeledclaimed
, to verify no one else is working on it.$ git clone git@github.com:YOUR-GITHUB-USER-NAME/dav-cli.git
npm install
to install all dependencies../bin/dav-cli.js
. You can also pass arguments to it (e.g.,./bin/dav-cli.js -s -p 1234
).$ git push -u origin master
#5
)Asking for help
We appreciate your effort in taking the time to work on this issue and help out the open source community and the foundation. If you need any help, feel free to ask below or in our gitter channel. We are always happy to help π