Change `config.json` to `config.js`
MichaelJCole opened this issue · 1 comments
Hi, my Wintersmith site is part of a larger web app.
I'd like to configure a dev/stage/prod.
To do that, I'll either need to juggle multiple config files, or make something to 'output' config.json
for wintersmith.
Because I'm using Meteor, my webapp's settings are in another file anyways settings.json
.
It would be awesome if I could access those settings via require()
, and configuration on process.env
json
is great for data in motion, but a PITA for data at rest. A regular npm module format would be great:
module.exports = function() {
return {
// All the settings here
}
}
Thanks!
Mike
You can use wintersmith programatically to pass in a config object you construct yourself. see https://github.com/jnordberg/wintersmith/blob/master/src/core/config.coffee and https://github.com/jnordberg/wintersmith/blob/master/src/core/environment.coffee#L290