most config items are from db, so is hard to generate from normal configuration, and they might change the way how code is being generated as well. I went back to use import_config in together with a mix task to create a config file by using Macro.to_string(quote bind_quotes: [value: value] do use Mix.Config config app, key: value end) before doing exrm release.
在 2016年8月1日星期一 UTC+8下午10:01:28,OvermindDL1写道: > > Large variety of ways of taking this. Where are the key/values coming > from and why can they not be put in a normal configuration file first? > > On Monday, August 1, 2016 at 4:21:22 AM UTC-6, Narcissus Emi wrote: >> >> Hi, >> >> I'm now running a project which needs to generate config file based on >> user configurable key/value pair, I would like to create a >> user.exs(imported from config.exs) to before recompile and deploy the file >> all programmatically,currently I'm stucked at creating this exs file part. >> >> Since a exs is just a valid keyword list, I think maybe using >> IO.inspect(keywords) and write to a file is already enough? Or is there any >> libs or methods we can do it more elegantly? >> >> Hope anybody came across similar problem before, any help would be real >> appreciate :) >> > -- You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/080025a6-4126-402f-ba12-e81c7f88cdf0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.