basho / cuttlefish

never lose your childlike sense of wonder baby cuttlefish, promise me?
Apache License 2.0
205 stars 124 forks source link

So, how _do_ I generate a default conf file? #154

Closed rlipscombe closed 10 years ago

rlipscombe commented 10 years ago

The wiki talks about generating default config files, but doesn't say how to actually do this.

rlipscombe commented 10 years ago

Oh, OK. It's done by the rebar plugin.

But we don't use "rebar generate" -- we're using relx. We could write a relx plugin for cuttlefish, but until then:

{_, Mappings, _} = cuttlefish_schema:files(filelib:wildcard("path/to/*.schema")).
ok = cuttlefish_conf:generate_file(Mappings, "path/to/generated.conf").
joedevivo commented 10 years ago

Yeah, that's how. I'll add it to the documentation.