+3
-2
| { | ||
| "name": "parfait", | ||
| "version": "0.4.0", | ||
| "version": "0.5.0", | ||
| "author": "David M. Lee, II <leedm777@yahoo.com>", | ||
@@ -35,3 +35,4 @@ "description": "A sweet multi-layered configuration framework", | ||
| "coffeelint": "^1.2.0", | ||
| "mocha": "^1.18.2" | ||
| "mocha": "^1.18.2", | ||
| "sinon": "^1.9.1" | ||
| }, | ||
@@ -38,0 +39,0 @@ "license": "MIT", |
@@ -40,7 +40,9 @@ # Copyright (c) 2014. David M. Lee, II <leedm777@yahoo.com> | ||
| .then (baseEnvConfig) -> | ||
| parfait = baseEnvConfig.parfait || {} | ||
| appdirsConfig = baseEnvConfig.appdirs || {} | ||
| appName = appdirsConfig.appName | ||
| appAuthor = appdirsConfig.appAuthor | ||
| if parfait.appName | ||
| siteDir = appdirs.siteDataDir(parfait.appName, parfait.appAuthor) | ||
| userDir = appdirs.userDataDir(parfait.appName, parfait.appAuthor) | ||
| if appName | ||
| siteDir = appdirs.siteDataDir(appName, appAuthor) | ||
| userDir = appdirs.userDataDir(appName, appAuthor) | ||
@@ -47,0 +49,0 @@ # Now the site config |
@@ -14,3 +14,3 @@ # Copyright (c) 2014. David M. Lee, II <leedm777@yahoo.com> | ||
| ### | ||
| readFile = (path) -> | ||
| exports.readFile = (path) -> | ||
| new Promise (resolve, reject) -> | ||
@@ -30,3 +30,3 @@ fs.readFile path, 'utf-8', (err, contents) -> | ||
| ### | ||
| stat = (path) -> | ||
| exports.stat = (path) -> | ||
| new Promise (resolve, reject) -> | ||
@@ -46,3 +46,3 @@ fs.stat path, (err, stat) -> | ||
| ### | ||
| readdir = (directory) -> | ||
| exports.readdir = (directory) -> | ||
| new Promise (resolve, reject) -> | ||
@@ -54,3 +54,1 @@ fs.readdir directory, (err, dir) -> | ||
| resolve dir | ||
| module.exports = {readFile, stat, readdir} |
14272
0.34%7
16.67%