From 080a458712d7e3e99e8a118e2147bac5535b844a Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 22 Jun 2015 11:57:34 -0400 Subject: [PATCH] feature(config) tryrequire -> readjson --- lib/server/config.js | 6 +++--- package.json | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/server/config.js b/lib/server/config.js index 6343da7b..f4914ba9 100644 --- a/lib/server/config.js +++ b/lib/server/config.js @@ -16,7 +16,7 @@ pipe = require('pipe-io'), ponse = require('ponse'), jonny = require('jonny'), - tryRequire = require('tryrequire'), + readjson = require('readjson'), apiURL = CloudFunc.apiURL, @@ -24,8 +24,8 @@ ConfigHome = homedir() + '.cloudcmd.json', config = - tryRequire(ConfigHome) || - tryRequire(ConfigPath); + readjson.sync.try(ConfigHome) || + readjson.sync.try(ConfigPath); module.exports = manage; module.exports.save = save; diff --git a/package.json b/package.json index dfe37553..22c22890 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "package-json": "~1.2.0", "pipe-io": "~1.1.1", "ponse": "~1.4.0", + "readjson": "~1.1.0", "rendy": "~1.1.0", "restafary": "~1.3.0", "socket.io": "~1.3.5",