Skip to content

Commit

Permalink
Merge pull request #10 from dnlup/update-notifier
Browse files Browse the repository at this point in the history
feat(update-notifier): Add update notifer
  • Loading branch information
jaydp17 authored Oct 28, 2017
2 parents 58c4833 + 41547af commit ab4561e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"axios": "^0.16.2",
"babel-polyfill": "^6.26.0",
"number-abbreviate": "^2.0.0",
"update-notifier": "^2.3.0",
"yargs": "^10.0.3"
},
"devDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
import 'babel-polyfill';
import yargs from 'yargs';
import abbreviate from 'number-abbreviate';
import updateNotifier from 'update-notifier';

import playList from './playlist';

const pkg = require('../package.json');

const { YOUTUBE_PLAYLIST_SORTER_API_KEY } = process.env;
if (!YOUTUBE_PLAYLIST_SORTER_API_KEY) {
console.error('YOUTUBE_PLAYLIST_SORTER_API_KEY not found in env vars');
process.exit(1);
}

// Check for updates and notify if available
updateNotifier({ pkg }).notify();

const argv = yargs
.usage('$0 <Playlist URL>')
.demandCommand(1, 1, 'Youtube Playlist URL not provided!', 'Only 1 Youtube Playlist URL needed!')
Expand Down

0 comments on commit ab4561e

Please sign in to comment.