Comparing version 0.0.1 to 0.1.0
14
heyo.js
@@ -9,2 +9,12 @@ #!/usr/bin/env node | ||
if (!fs.existsSync(configFile)) { | ||
var emptyConfig = { | ||
username: "", | ||
udid: "", | ||
users: [] | ||
}; | ||
fs.writeFileSync(configFile, JSON.stringify(emptyConfig)); | ||
} | ||
fs.readFile(configFile, { encoding: 'utf-8' }, function(err, data) { | ||
@@ -22,2 +32,6 @@ var config = JSON.parse(data); | ||
if (args[0] === 'list') { | ||
if (config.users.length === 0) { | ||
return console.log('you have not registered any users in heyo yet'); | ||
} | ||
config.users.forEach(function(n) { | ||
@@ -24,0 +38,0 @@ console.log(n.username); |
{ | ||
"name": "heyo", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "CLI for sending Yo notifications", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
3478
88
5