Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templating engine as library #1707

Closed
oyvindh opened this issue Nov 22, 2018 · 3 comments
Closed

Templating engine as library #1707

oyvindh opened this issue Nov 22, 2018 · 3 comments

Comments

@oyvindh
Copy link

oyvindh commented Nov 22, 2018

It would be great to see a library, so that the templating engine could be integrated into programs without having to rely on calling out to a process. Happy to contribute :)

@mlorbetske
Copy link
Contributor

Hi @oyvindh, that's actually the case already. The packages for doing so are currently not on NuGet, however they are available on MyGet at https://dotnet.myget.org/gallery/templating. Using the code that calls in to the engine in the CLI project or the IDE bootstrapperas a guide (depending on which one is closer to your use case) would be the best places to start.

@hh532
Copy link

hh532 commented Nov 29, 2018

Hi @mlorbetske , I'm working with oyvind on this. Would you mind linking the relevant files in the CLI project too? I have difficulty finding what I'm looking for, with the closest being the Dotnet.cs and Battery.cs files. Most promising is the "CreateNewCommandWithArgsForTemplate" method in CommandParserSupport.cs. Any help would be greatly appreciated!

@mlorbetske
Copy link
Contributor

CreateTemplateAsync in https://github.com/dotnet/templating/blob/4bd80f0577550c7f36867b53d0c074f8f3dcde17/src/Microsoft.TemplateEngine.Cli/New3Command.cs will probably be the best thing to look at if you’re working toward a command line experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants