Merge code paths for example to executable
Author: ST-DDTCreated Sep 13, 2026Updated Sep 13, 2026
Labelsc: docss: on holdp: 1-normalc: testc: infra
Currently we have two separate paths to convert our examples into runnable code.
- for our verify jsdocs test
- for our api docs generation
These should be merged into one and provided as a shared util probably in scripts.
There are currently too many refactorings regarding those places in progress, so we cannot start with that yet.
The idea of the method is:
- Search project root for exports
- Search example for needed imports
- Generate import statements
- Either:
- Return them
- Return them +
// cutseparator + code
I will do the refactoring later.
Source: faker-js/faker