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] Added generate-markdown scripts #3142

Merged

Conversation

khushal87
Copy link
Member

@khushal87 khushal87 commented Jul 16, 2021

What kind of change does this PR introduce?
This PR introduces adding new generate markdown scripts which use json2md. The output from the previous scripts is served into this to generate markdown out of it and is finally stored in the .docgen folder.

Did you add tests for your changes?
No, tests will be dealt with later if required.

If relevant, did you update the documentation?
This will be done in a single PR later when the entire script will be live.

Summary
This is done using the script written in generateMarkdown.ts. The script has a primary function generateMarkdown which is called in the index.ts for every component file and then the output is stored in the .docgen directory. The scripts have custom converters for the purpose of generating the markdown in the required format including the Header, imports, prop link, props data, etc. Finally, this structure gives the output in the form of a single markdown output for a file. This is then stored in the directory.

Does this PR introduce a breaking change?
No.

Other information
Not required.

Tags
#gsoc #docs-autogen #khushal87

@codecov
Copy link

codecov bot commented Jul 16, 2021

Codecov Report

❗ No coverage uploaded for pull request base (next@38b5dbb). Click here to learn what that means.
The diff coverage is 81.42%.

❗ Current head 269b21d differs from pull request most recent head 0b6f38d. Consider uploading reports for the commit 0b6f38d to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             next    #3142   +/-   ##
=======================================
  Coverage        ?   83.87%           
=======================================
  Files           ?       78           
  Lines           ?     1687           
  Branches        ?      666           
=======================================
  Hits            ?     1415           
  Misses          ?      268           
  Partials        ?        4           
Impacted Files Coverage Δ
src/AirbnbRating/AirbnbRating.tsx 0.00% <0.00%> (ø)
src/PricingCard/components/PricingButton.tsx 100.00% <ø> (ø)
src/Rating/Rating.tsx 0.00% <ø> (ø)
src/SearchBar/SearchBar-android.tsx 98.30% <ø> (ø)
src/SearchBar/SearchBar-default.tsx 95.74% <ø> (ø)
src/SearchBar/SearchBar-ios.tsx 89.70% <ø> (ø)
src/SearchBar/SearchBar.tsx 100.00% <ø> (ø)
src/SearchBar/__tests__/common.tsx 100.00% <ø> (ø)
src/Slider/Slider.tsx 60.47% <ø> (ø)
src/Slider/components/Rect.tsx 45.45% <ø> (ø)
... and 68 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38b5dbb...0b6f38d. Read the comment docs.

@flyingcircle flyingcircle merged commit 6b4e411 into react-native-elements:next Jul 16, 2021
@khushal87 khushal87 deleted the khushal87-markdown-generate branch August 14, 2021 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants