Replies: 2 comments 1 reply
-
I did actually start putting together a nuget package for the Engine component since I agree that it makes a lot of sense to be able to wrap this into other applications but "real life" got in the way ;-) I had a brief look at your fork and it certainly looks interesting. I think it's worth considering a couple of different kinds of extensibility:
Anyway, definitely interested in taking this further - look forward to hearing from you. |
Beta Was this translation helpful? Give feedback.
-
Are you thinking of having this kind of configurability from within the current UI? (It's tempting to then start considering ways of allowing the user to specify options via configuration dialogs etc.) I'd kind of envisaged that people who really wanted to change behaviour would write their own UI (possibly even bypassing ApplicationEngine) but I can see why you're coming at this more from a DI angle if your wanting to keep more of the existing application while getting more flexibility in policy decisions.
Yes, this a great example. (Though for this specifically I like the idea of opening up the api to add a WithConfiguration(Action<>) type method.
Are you talking specifically about texproj files (TextrudeProject.cs) ? The closest to thing to what you want is the Render method (line 430) in MainWindow.xaml.cs. (EngineInputSet is taken from the project file, then use the EngineOutputSet to figure out which outputs you want. But... perhaps this should be easier. I raised issue #31 a while back, really as a reminder that TextrudeProject should really be layered with ApplicationEngine rather than the UI variant.
I really like this idea - are you talking about validating output or just that the template is parseable. Either way it's trickier once you consider includes and possible reliance on environment variables. |
Beta Was this translation helpful? Give feedback.
-
Hello, I really like what you did here as I have also built some private wrappers etc around scriban for an Engine.
I would love ot make use of your library but there is some issues with extensibility.
I don't think it is very easy to inject new Scriban delegates, Different template loaders etc.
I have been working through some ways to do this.
Check out my fork https://github.com/glemis/Textrude
Ideally I think the core Engine should be there own Nuget package.
Then the specific implementations using the core packages aka
Beta Was this translation helpful? Give feedback.
All reactions