brenoguim / flexclass

A library for classes with flexible layout
MIT License
56 stars 6 forks source link

Using mdsnippets to generate shared_array_example in README #26

Closed thamara closed 3 years ago

thamara commented 3 years ago

Using MarkdownSnippets to generate the example in README. The way it works is by having comments on tests (which usually are run in CI, guaranteeing they will work and not get outdated) and a placeholder comment on the README file that identifies where the snippet of code will be. An example of it being used in another repository can be found here.

I'm including a workflow that runs on all push on the master branch, keeping it updated even if the test changes.

If you like this idea, I can move other examples to tests, which will allow the reuse of the code in the README file too :)

brenoguim commented 3 years ago

Very nice! thank you for that!!