Skip to content

Commit b5afeef

Browse files
committed
feat: notify when update is available
1 parent 4b0092f commit b5afeef

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

bin/ipfs-deploy.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/usr/bin/env node
2+
const updateNotifier = require('update-notifier')
3+
const pkg = require('../package.json')
4+
5+
updateNotifier({ pkg, updateCheckInterval: 0 }).notify()
6+
27
const chalk = require('chalk')
38
const yargs = require('yargs')
49

@@ -115,9 +120,11 @@ async function main() {
115120
if (argv.h) {
116121
// Had to do this because couldn't get yargs#epilogue() to work
117122
process.stdout.write(`
123+
118124
For help or more information, ping me at
119125
https://twitter.com/${chalk.whiteBright('agentofuser')}
120-
`)
126+
127+
`)
121128
} else {
122129
const pinnedHash = await deploy(deployOptions)
123130
if (!pinnedHash) {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"prettier": "^1.17.0",
5151
"public-ip": "^3.1.0",
5252
"trammel": "^2.1.0",
53+
"update-notifier": "^2.5.0",
5354
"yargs": "^13.2.2"
5455
},
5556
"devDependencies": {

0 commit comments

Comments
 (0)