all repos — archive/homestead @ 562b0533300ad5ad8cf4695aa7fc2b844b918169

My future indieweb platform

feat: load config from cwd and merge with defaults

Alan Pearce
commit

562b0533300ad5ad8cf4695aa7fc2b844b918169

parent

136ebe22452c0015770d9f0ac9d94d8941461816

1 file changed, 11 insertions(+), 7 deletions(-)

changed files
M src/modules/config.jssrc/modules/config.js
@@ -1,10 +1,14 @@
-'use strict' +"use strict"; -const TOML = require('toml') -const config = require('configly') +const path = require("path"); +const TOML = require("toml"); +const config = require("configly"); -module.exports = config({ - parsers: { - toml: TOML.parse +module.exports = config( + ["./config", path.resolve(__dirname, "../../config/")], + { + parsers: { + toml: TOML.parse + } } -}) +);