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

docs: How to handle code snippets? #301

Closed
afontcu opened this issue Jun 4, 2020 · 2 comments
Closed

docs: How to handle code snippets? #301

afontcu opened this issue Jun 4, 2020 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@afontcu
Copy link
Member

afontcu commented Jun 4, 2020

Almost every page on docs have some code snippets. The question is:

How can we make sure that these examples are working as expected? How can we make sure that these examples will continue to work as expected? It would be really bad to provide broken, outdated samples.

For now, I've been writing samples in VTU-next repo, running them along the tests. However, this scales poorly, and there's no way we can ask contributors to do so (and, even then, make sure they did).

Is there a way to import code snippets from somewhere else, where they can be run and tested?

Are there other alternatives?

@leopiccionia
Copy link

May the Import Code Snippets be the feature you want? It even allows importing code regions, what's pretty neat -- no need for hardcoding line numbers in Markdown.

@afontcu
Copy link
Member Author

afontcu commented Jun 5, 2020

Oh, looks promising 🤔 gonna take a look! Thanks :)

@afontcu afontcu changed the title How to handle code snippets? docs: How to handle code snippets? Jan 25, 2021
@afontcu afontcu transferred this issue from vuejs/test-utils-docs Jan 25, 2021
@afontcu afontcu added the documentation Improvements or additions to documentation label Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants