andyg
09/29/2022, 6:20 AMconfigure
function param? Secondly, would it be ok to introduce a separate configuration class/object so certain options don't need to be passed on every call? This is challenging -- thanks for the guidance.dave
09/29/2022, 6:31 AMandyg
09/29/2022, 7:03 AMLeague.Team.Player
might not be associated with <root_dir>/league/team/player.ext
)dave
09/29/2022, 7:07 AMobject
andyg
09/29/2022, 7:32 AMdave
09/29/2022, 9:07 AM{{config.url}}
If not - you could also do something like use delegation:
interface Config {
val url : Uri
}
data class ActualConfig(override val url: Uri) : Config
class MyViewModel(config: Config) : Config by config
val a = MyViewModel(ActualConfig(Uri.of("whatever")))
Andrew O'Hara
09/30/2022, 3:18 AMdave
09/30/2022, 6:23 AMandyg
10/04/2022, 8:49 AMbuild.gradle.kts
. Anyway, before I get too deep, it would be helpful if you'd take a look and let me know if I'm on the right track and you're ok with the code style, etc. No rush, I know you guys are very busy. It's obviously not ready for a pull request but it is available to view on Github. Thanks.dave
10/04/2022, 9:08 AMandyg
10/04/2022, 9:14 AMdave
10/05/2022, 9:18 AMandyg
10/06/2022, 5:53 AMTemplateRenderer
requires a ViewModel
as the parameter for its invoke
method, just like Handlebars and the rest, and it works with a plain ViewModel
(tests pass). What I added is a new class JteContent
that inherits from ViewModel
but also adds some convenience functions. The existing implementation works with HotReload()
renderer and the goal is to get the other two (Caching()
and CachingClasspath()
), I just need to figure out how to build and test with precompiled jte templates. Like I said, I know you're busy, happy to talk more at a time that is good for you. Thanks!