toddams / RazorLight

Template engine based on Microsoft's Razor parsing engine for .NET Core
Apache License 2.0
1.5k stars 259 forks source link

Update Embedded Resource Docs to be more explicit #475

Closed mwasson74 closed 2 years ago

mwasson74 commented 2 years ago

472

mwasson74 commented 2 years ago

Do I also need to update README.source.md? I wasn't sure what or how that file is used...

jzabroski commented 2 years ago

Yes. README.source.md is the actual readme. We use a tool by Simon Cropp that allows dynamically including code snippets into the readme file so that the code snippets can be type checked by C# compiler.

mwasson74 commented 2 years ago

@jzabroski I reverted the previous changes and hopefully made them the correct way this time. Please let me know if there's anything I need to fix!!

jzabroski commented 2 years ago

Almost perfect. If you build the code it will update the README.md, then you can check in the source, snippets cs file, and the readme.md in one commit. Do you want to squash your commits and submit a new PR so its clean?

mwasson74 commented 2 years ago

Oh, ok!! How do I go about doing that? Sorry, newbie here...

jzabroski commented 2 years ago

https://github.com/toddams/RazorLight/blob/master/tests/RazorLight.Tests/RazorLight.Tests.csproj#L37

If you clone the repo and just run dotnet build i believe it will trigger this "magic nuget package" to do the heavy lifting. You have to call it at the solution level though.

mwasson74 commented 2 years ago

I can give that a whirl!! How about the squashing my commits part? I've only ever squashed commits on a merge back into the main branch...

jzabroski commented 2 years ago

@mwasson74 I'll did it for you.

mwasson74 commented 2 years ago

@jzabroski thanks! I tried, squashing via interactive rebase but that must not have been what you were referring to...?

jzabroski commented 2 years ago

To be honest, I didnt know GitHub PRs supported "squash and merge" . I normally just click Merge pull request. I should probably update my best practices to reduce a lot of noise.

mwasson74 commented 2 years ago

Ha!! The company I work for uses an on-prem instance of Azure DevOps with Git as a source control. We have a policy setup on all of our repos that force a squash commit when merging 👌