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
Automation: Main Next Integrate #11798
Merged
sonalivdeshpande
merged 6 commits into
next
from
main-next-179502b45712b92c9ae5e833f4b28182ba74b7ef
Sep 2, 2022
Merged
Automation: Main Next Integrate #11798
sonalivdeshpande
merged 6 commits into
next
from
main-next-179502b45712b92c9ae5e833f4b28182ba74b7ef
Sep 2, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…enter fork (#11542) Adds new package: `@fluid-tools/api-markdown-documenter` - a wrapper around [API-Documenter](https://github.com/microsoft/rushstack/tree/main/apps/api-documenter) which offers a programmatic API surface for generating API documentation from an API report generated by [API-Extractor](https://api-extractor.com/). ## Goal The purpose of this library is to process the reports generated by API-Extractor and generate a suite Markdown-formatted API documentation from them. Generally, this is accomplished by using API-Documenter directly, but that package has a number of serious limitations: - It prescribes a specific documentation suite layout, and one that was crafted for use with DocFX specifically. - We are not using DocFX, and the DocFX format does not work well with our website generation system (Hugo). - It generates a separate file for **each API item**. - This ends up being a massive list of files, and requires a lot of needless cross-page navigation when reading the documentation. - It exposes only a single, CLI entrypoint, which takes in a list of API reports and generates a set of files. - This does not offer much in the way of flexibility, and means we are limited with regards to how we use the generated content. This library aims to solve these problems by exposing an API surface with the following primary goals: - Support programmatic usage - Allows consumers to do more with the generated content other than simply writing it unmodified to disk. By offering an API that returns a description of documentation content, consumers may choose to embed the content in other document files, transform the contents to inject system-specific (e.g. Hugo) front-matter before writing content to disk, etc. - Highly extensible / configurable - Offers flexibility around file / directory layout, content-type-wise rendering policy, etc. (with a suite of default policies and rendering helpers). ## Current Status V1 adds the general logic for generating markdown documentation with some level of configurability. It does not yet generate documentation in visual parity with our existing [API-Documenter fork](https://github.com/tylerbutler/custom-api-documenter/tree/dev) (though it is pretty close). Such parity (aside from some visual and hierarchical improvements over our existing fork) will be added in future PRs. The main entry-points to the library are in `MarkdownDocumenter.ts`. Extensibility options are exposed via config types declared in `Policies.ts` and `RenderingPolicy.ts`. For sample rendering output, see the contents of `src/test/snapshots`. It is the test output for a sample test-suite copied over from our API-Documenter fork. Note that the package currently does not have a CLI entry-point. I'm not sure we really need one. I see this being invoked programmatically so we can inject Hugo frontmatter, etc. dynamically. This can always be re-evaluated in the future though, if we think one would be valuable. ## Open Questions 1. Where does this live? This really isn't Fluid-related, it's just a tool we intend to maintain / use. Should this be in its own repo? In a repo with other library packages we maintain and use, but aren't actually Fluid-specific? ## Next steps This PR will merge the package in as a "private" package. Further work will need to be done before making it public and consuming it in the website code (/docs). My intention is to tackle these as subsequent PRs - Verify Hugo compatibility in this website code - Update rendering to have style-wise parity with the current implementation And, of course, eventually replace our use of the existing API-Documenter fork with the new package. For reference, I have a draft PR up with the changes (relative to this branch) to start using the new package in our docs build: Josmithr#1 ## Long-Term Goals Longer term, we wish to expand on this library to be even more flexible / configurable and to rely on API-Documenter-specific concepts less. The intention is to model this library in terms of Abstract Syntax Trees (ASTs), using [unist](https://github.com/syntax-tree/unist) and [mdast](https://github.com/syntax-tree/mdast) to offer consumers a more granular surface for generating / modifying generated API docs contents. Co-authored-by: Justin Myhres <Justin.Myhres@microsoft.com> Co-authored-by: Tyler Butler <tyler@tylerbutler.com>
sonalivdeshpande
approved these changes
Sep 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: build
Build related issues
area: dds: sharedstring
area: dds
Issues related to distributed data structures
base: next
PRs targeted against next branch
community-contribution
do-not-squash-merge
main-next-integrate
public api change
Changes to a public API
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main-next integrate PR
The aim of this pull request is to sync main and next branch. The expectation from the assignee is as follows:
For more information about how to resolve merge conflicts and CI failures, visit [this wiki page]
(https://github.com/microsoft/FluidFramework/wiki/Main-next-Automation).