mirror of
https://github.com/wahyd4/say-it.git
synced 2026-08-08 21:02:13 +10:00
add package update notifier
This commit is contained in:
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "say-it",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.5",
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"ajv": {
|
||||
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "say-it",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"description": "Read the text you typed in command line by using Baidu tts.",
|
||||
"main": "say-it.js",
|
||||
"bin": {
|
||||
@@ -30,6 +30,7 @@
|
||||
"inquirer": "^3.0.6",
|
||||
"lodash": "^4.17.4",
|
||||
"play-sound": "^1.1.1",
|
||||
"request": "^2.81.0"
|
||||
"request": "^2.81.0",
|
||||
"update-notifier": "^2.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ const player = require('play-sound')(opts = {
|
||||
const charm = require('charm')()
|
||||
const TEXTS = require('./texts')
|
||||
const _ = require('lodash')
|
||||
const updateNotifier = require('update-notifier');
|
||||
const pkg = require('./package.json');
|
||||
|
||||
const showError = (error = TEXTS.error) => {
|
||||
console.log(chalk.red(error))
|
||||
@@ -19,6 +21,8 @@ var person = 0
|
||||
|
||||
charm.pipe(process.stdout);
|
||||
|
||||
updateNotifier({pkg}).notify(); //show npm package update if available
|
||||
|
||||
program
|
||||
.version('0.1')
|
||||
.command(' ', 'read the texts you typed in', {
|
||||
|
||||
Reference in New Issue
Block a user