-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature request: extract code from examples #59
Labels
Comments
ext
added a commit
that referenced
this issue
Nov 2, 2024
ext
added a commit
that referenced
this issue
Nov 2, 2024
ext
added a commit
that referenced
this issue
Nov 3, 2024
ext
added a commit
that referenced
this issue
Nov 3, 2024
ext
added a commit
that referenced
this issue
Nov 4, 2024
github-actions bot
pushed a commit
that referenced
this issue
Nov 4, 2024
## [2.13.0](v2.12.0...v2.13.0) (2024-11-04) ### Features * allow to cut snippets from examples ([db07585](db07585)) * new `extractExamplesProcessor` ([2559b06](2559b06)), closes [#59](#59) * strip eslint comments from examples ([5dd604e](5dd604e)) ### Bug Fixes * `cacheFolder` is optional ([e4ad918](e4ad918)) * `exampleFolders` is optional ([bf4893d](bf4893d)) * `markdown.messagebox` is optional ([d558a90](d558a90)) * `motdProcessor` options is optional ([d43c0cb](d43c0cb)) * `outputFolder` is optional ([53dde23](53dde23)) * only match filenames when matching source files ([aec08fa](aec08fa)) ### Performance Improvements * reuse same manifest `md` instance for all calls ([616f226](616f226))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add a way to extract all code examples and support running external tools on the code:
It should include a mechanism to configure such tools, e.g. a way to set which eslint rules to use or the path configuration for typescript.
Given a library
my-awesome-lib
with a functionadd(a: number, b: number)
:This example would be compiled with a tsconfig
"paths": { "my-awesome-lib": "./dist" }
and thus yield an error about missing the second argument to theadd
function.Similarly eslint would yield an error about unused variable
sum
.If the source is temporary stored on the filesystem the filenames should be traceable to where they originates from, both which file but also which example within that file. Something automagical that does not require explicit tagging.
${basename}-${index}-${hash}.${lang}
?There should be an override to prevent examples to be extracted, e.g.:
Should be language agnostic but preferably configurable which langauges to extract, possibly even map them to extensions:
Hypotetical processor:
Where
docs/examples
contains atsconfig.json
but is otherwise gitignored and a postbuild script runtstsc -b docs/examples
. Eslint runs as usual.This is a major showstopper for migration for my projects.
The text was updated successfully, but these errors were encountered: