StubbleOrg / Stubble

Trimmed down {{mustache}} templates in .NET
Other
402 stars 58 forks source link

Update the "How to use" section and put it in the docs #19

Closed DavidRouyer closed 6 years ago

DavidRouyer commented 6 years ago

The "How to use" section is not up to date.

The example:

var stubble = new Stubble();
var myObj = new MyObj();
using (StreamReader streamReader = new StreamReader(".\Path\To\My\File.Mustache", Encoding.UTF8))
{
    var output = stubble.Render(streamReader.ReadToEnd(), myObj);
}

should be:

var stubble = new StubbleBuilder().Build();
var myObj = new MyObj();
using (StreamReader streamReader = new StreamReader(".\Path\To\My\File.Mustache", Encoding.UTF8))
{
    var output = await stubble.RenderAsync(streamReader.ReadToEnd(), myObj);
}
Romanx commented 6 years ago

Hey,

Thank you for opening the issue. I'm currently working on a new release which will update the docs at the same time. Hopefully this should be by the start of next week.

I'll use this issue as a placeholder and mark any changes.

freerider7777 commented 6 years ago

How is a new release going? :)

Romanx commented 6 years ago

Hey @freerider7777 I'm actually just polishing up some performance work along with compiling templates which will bring my feature compatibility with Nustache as 1-to-1. You can see the work on the feature/compilation branch. Hoping to get a new alpha out this weekend with a look at a beta shortly after that.

Any feedback after the release will be more than welcomed!

x4dr commented 6 years ago

https://github.com/StubbleOrg/Stubble/wiki still does not reflect this. i needed to come here and read the should be part of a closed issue to actually begin using stubble at all

Romanx commented 6 years ago

@x4dr Really sorry for the trouble that you ran into. I'll update the wiki today to redirect to the how-to docs.

Thanks for posting here and letting me know.