docs: split custom Faker instance example
Currently two examples are joined and it looks quite confusing.
Deploy Preview for fakerjs ready!
| Name | Link |
|---|---|
| Latest commit | 9352293f227e78a8e9e75a566839e15f593a6913 |
| Latest deploy log | https://app.netlify.com/projects/fakerjs/deploys/6891e931993e5f00083757f9 |
| Deploy Preview | https://deploy-preview-3585.fakerjs.dev |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 99.96%. Comparing base (61e4c45) to head (9352293).
:warning: Report is 25 commits behind head on next.
Additional details and impacted files
@@ Coverage Diff @@
## next #3585 +/- ##
=======================================
Coverage 99.96% 99.96%
=======================================
Files 2894 2894
Lines 222262 222262
Branches 930 931 +1
=======================================
Hits 222195 222195
Misses 67 67
| Files with missing lines | Coverage Ξ | |
|---|---|---|
| src/faker.ts | 100.00% <ΓΈ> (ΓΈ) |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Initial attempt does not look as intended:
Still not perfect, but I think a little bit more clear
Is there a way to split examples into two boxes?
Removing second @example tag was the only way to achieve a bit of clarity. Still I think being able to break into two separate boxes would be best:
Is there a way to split examples into two boxes?
Yes, that would require some changes to the api-docs scripts.
Class-Level:
https://github.com/faker-js/faker/blob/61e4c45ac9176823e5e2a01dc1cfb761d3bb01d5/scripts/apidocs/output/page.ts#L76
Method-Level:
https://github.com/faker-js/faker/blob/61e4c45ac9176823e5e2a01dc1cfb761d3bb01d5/scripts/apidocs/output/page.ts#L195
Note: The later might have impact on the refresh examples button.
I think it's a bit tricky to read partly because of the other commented out code. (Like the CJS imports and the seed). So comments are being used both as a header and to show optional alternatives.
Maybe some of the commented lines could be removed or split to another example.