Skip to content

Commit

Permalink
build: Extract markdown-magic library into a repo-private package (mi…
Browse files Browse the repository at this point in the history
…crosoft#14629)

Does not change when / where the tooling is invoked, it simply hoists
the underlying logic into its own tooling library.

Subsequent changes will update the patterns for when / where we invoke
the tooling to better encapsulate doc generation in different parts of
the repo.

Notes:
* Abstracting the logic required updating how `INCLUDE` pragma paths are
represented. Previously, these were all written relative to the repo
root. Now they are relative to the document containing the pragma.
* Since the home of the logic changes, the generated content notices
added to documents was updated.
* A few pragma names were changed to make the usage semantics a bit more
explicit.
* The default value of `usesTinylious` for "Getting Started" sections
was changed from `false` to `true`, as the majority of our uses specify
true.

All of the changes to documentation files should be due to one of the
above - no other functional / content changes are expected.

---------

Co-authored-by: Tyler Butler <[email protected]>
Co-authored-by: Alex Villarreal <[email protected]>
  • Loading branch information
3 people authored Mar 24, 2023
1 parent 534da6b commit 63b3d92
Show file tree
Hide file tree
Showing 108 changed files with 6,573 additions and 755 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ to prevent phantom dependencies from being introduced but they're not foolproof.
<!-- AUTO-GENERATED-CONTENT:START (README_CONTRIBUTION_GUIDELINES_SECTION:includeHeading=FALSE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

There are many ways to [contribute](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md) to Fluid.

Expand Down
9 changes: 3 additions & 6 deletions azure/packages/azure-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ const text1 = await map1.get("text1-unique-id").get();
<!-- AUTO-GENERATED-CONTENT:START (README_CONTRIBUTION_GUIDELINES_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Contribution Guidelines

Expand All @@ -196,8 +195,7 @@ Use of Microsoft trademarks or logos in modified versions of this project must n
<!-- AUTO-GENERATED-CONTENT:START (README_HELP_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Help

Expand All @@ -214,8 +212,7 @@ Thank you!
<!-- AUTO-GENERATED-CONTENT:START (README_TRADEMARK_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Trademark

Expand Down
9 changes: 3 additions & 6 deletions azure/packages/azure-local-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ npm run start
<!-- AUTO-GENERATED-CONTENT:START (README_CONTRIBUTION_GUIDELINES_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Contribution Guidelines

Expand All @@ -59,8 +58,7 @@ Use of Microsoft trademarks or logos in modified versions of this project must n
<!-- AUTO-GENERATED-CONTENT:START (README_HELP_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Help

Expand All @@ -77,8 +75,7 @@ Thank you!
<!-- AUTO-GENERATED-CONTENT:START (README_TRADEMARK_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Trademark

Expand Down
9 changes: 3 additions & 6 deletions azure/packages/azure-service-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ This function will generate a JWT token that can be sent to an `ITokenProvider`
<!-- AUTO-GENERATED-CONTENT:START (README_CONTRIBUTION_GUIDELINES_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Contribution Guidelines

Expand All @@ -37,8 +36,7 @@ Use of Microsoft trademarks or logos in modified versions of this project must n
<!-- AUTO-GENERATED-CONTENT:START (README_HELP_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Help

Expand All @@ -55,8 +53,7 @@ Thank you!
<!-- AUTO-GENERATED-CONTENT:START (README_TRADEMARK_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Trademark

Expand Down
9 changes: 3 additions & 6 deletions azure/packages/external-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ secret key in the client-side code whereas while running the service locally for
<!-- AUTO-GENERATED-CONTENT:START (README_CONTRIBUTION_GUIDELINES_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Contribution Guidelines

Expand All @@ -127,8 +126,7 @@ Use of Microsoft trademarks or logos in modified versions of this project must n
<!-- AUTO-GENERATED-CONTENT:START (README_HELP_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Help

Expand All @@ -145,8 +143,7 @@ Thank you!
<!-- AUTO-GENERATED-CONTENT:START (README_TRADEMARK_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Trademark

Expand Down
9 changes: 3 additions & 6 deletions azure/packages/test/end-to-end-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ To run Azure Local Service e2e tests: `test:realsvc`.
<!-- AUTO-GENERATED-CONTENT:START (README_CONTRIBUTION_GUIDELINES_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Contribution Guidelines

Expand All @@ -37,8 +36,7 @@ Use of Microsoft trademarks or logos in modified versions of this project must n
<!-- AUTO-GENERATED-CONTENT:START (README_HELP_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Help

Expand All @@ -55,8 +53,7 @@ Thank you!
<!-- AUTO-GENERATED-CONTENT:START (README_TRADEMARK_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Trademark

Expand Down
9 changes: 3 additions & 6 deletions azure/packages/test/scenario-runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ Scenario runnner for FRS and Azure Local Service. This package can be used to cr
<!-- AUTO-GENERATED-CONTENT:START (README_CONTRIBUTION_GUIDELINES_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Contribution Guidelines

Expand All @@ -78,8 +77,7 @@ Use of Microsoft trademarks or logos in modified versions of this project must n
<!-- AUTO-GENERATED-CONTENT:START (README_HELP_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Help

Expand All @@ -96,8 +94,7 @@ Thank you!
<!-- AUTO-GENERATED-CONTENT:START (README_TRADEMARK_SECTION:includeHeading=TRUE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Trademark

Expand Down
1 change: 1 addition & 0 deletions build-tools/packages/build-tools/data/exclusions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"azure/packages/azure-local-service/src/index.ts",
"experimental/PropertyDDS/packages/property-query/test/get_config.js",
"experimental/PropertyDDS/services/property-query-service/test/get_config.js",
"tools/markdown-magic/test",
"tools/telemetry-generator/package-lock.json"
]
5 changes: 2 additions & 3 deletions common/build/eslint-config-fluid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ ESLint provides a way to print the config that would apply to a file (`--print-c
print out the applied config as a JSON file. As we make changes to the config, we can print out the config again and get
a diff to review as part of a PR -- just like we do with API reports for code changes.

<!-- AUTO-GENERATED-CONTENT:START (SCRIPTS) -->
<!-- AUTO-GENERATED-CONTENT:START (README_PACKAGE_SCRIPTS) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

## Scripts

Expand Down
5 changes: 2 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,10 @@ The site theme/template lives in `themes/thxvscode`.

The following npm scripts are supported in this directory:

<!-- AUTO-GENERATED-CONTENT:START (SCRIPTS:includeHeading=FALSE) -->
<!-- AUTO-GENERATED-CONTENT:START (README_PACKAGE_SCRIPTS:includeHeading=FALSE) -->

<!-- prettier-ignore-start -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->

| Script | Description |
|--------|-------------|
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/build/audience.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ You can address this scenario using DDSes in the same way as with the persisted

In some cases, the user data could be generated locally or fetched from an external service. For example, consider a scenario where you want to display the connected users with a profile picture and a color border. If your app retrieves a user's profile picture from a user metadata service and assigns each user a color based on a hash of their user ID, then the app will have the desired data on other users without needing to communicate with them.

<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=docs/_includes/links.md) -->
<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=../../../_includes/links.md) -->

<!-- prettier-ignore-start -->
<!-- NOTE: This section is automatically generated by embedding the referenced file contents. Do not update these generated contents directly. -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- Links -->

<!-- Concepts -->
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/build/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ When you create or connect to a container with `createContainer` or `getContaine
This object contains references to useful services you can use to build richer applications.
An example of a container service is the [Audience]({{< relref "audience.md" >}}), which provides user information for clients that are connected to the container. See [Working with the audience]({{< relref "audience.md#working-with-the-audience" >}}) for more information.

<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=docs/_includes/links.md) -->
<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=../../../_includes/links.md) -->

<!-- prettier-ignore-start -->
<!-- NOTE: This section is automatically generated by embedding the referenced file contents. Do not update these generated contents directly. -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- Links -->

<!-- Concepts -->
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/build/data-modeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ Dynamic objects are more difficult to work with than initial objects, but are es
An example where this is useful is building a collaborative storyboarding application. In this scenario, you can have a large number of individual boards that make up the storyboard. By using a dynamic shared object for each board your code can load the boards on demand as the user accesses them, instead of having to load them all in memory at once.
<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=docs/_includes/links.md) -->
<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=../../../_includes/links.md) -->
<!-- prettier-ignore-start -->
<!-- NOTE: This section is automatically generated by embedding the referenced file contents. Do not update these generated contents directly. -->
<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- Links -->
<!-- Concepts -->
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/build/dds.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ These DDSes are used for storing key-value data. They are all optimistic and use
* [SharedCounter][] -- a distributed counter.
* [SharedString][] -- a specialized data structure for handling collaborative text.

<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=docs/_includes/links.md) -->
<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=../../../_includes/links.md) -->

<!-- prettier-ignore-start -->
<!-- NOTE: This section is automatically generated by embedding the referenced file contents. Do not update these generated contents directly. -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- Links -->

<!-- Concepts -->
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/build/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ For specifics about each service-specific client implementation see their corres

For more information see [Packages]({{< relref "packages.md" >}}).

<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=docs/_includes/links.md) -->
<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=../../../_includes/links.md) -->

<!-- prettier-ignore-start -->
<!-- NOTE: This section is automatically generated by embedding the referenced file contents. Do not update these generated contents directly. -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- Links -->

<!-- Concepts -->
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/build/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ You can [read more about the scopes and their intent][scopes] in the Fluid Frame

[scopes]: https://github.com/microsoft/FluidFramework/wiki/npm-package-scopes

<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=docs/_includes/links.md) -->
<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=../../../_includes/links.md) -->

<!-- prettier-ignore-start -->
<!-- NOTE: This section is automatically generated by embedding the referenced file contents. Do not update these generated contents directly. -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- Links -->

<!-- Concepts -->
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/concepts/handles.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ const text2 = await myMap2.get("my-text").get();
console.log(text === text2) // true
```

<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=docs/_includes/links.md) -->
<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=../../../_includes/links.md) -->

<!-- prettier-ignore-start -->
<!-- NOTE: This section is automatically generated by embedding the referenced file contents. Do not update these generated contents directly. -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- Links -->

<!-- Concepts -->
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/concepts/signals.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ this.signalManager.onSignal("connectRequest", (clientId, local, payload) => {

The payload sent back in response to the `connectRequest` should include all the relevant information the newly connected user needs.

<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=docs/_includes/links.md) -->
<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=../../../_includes/links.md) -->

<!-- prettier-ignore-start -->
<!-- NOTE: This section is automatically generated by embedding the referenced file contents. Do not update these generated contents directly. -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- Links -->

<!-- Concepts -->
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/concepts/tob.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ Summary ops summarize the state of distributed data structures, so Data Objects
data structures) don't need to do anything to participate in summarization; it happens automatically, and all
Data Objects' data structures will be summarized.

<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=docs/_includes/links.md) -->
<!-- AUTO-GENERATED-CONTENT:START (INCLUDE:path=../../../_includes/links.md) -->

<!-- prettier-ignore-start -->
<!-- NOTE: This section is automatically generated by embedding the referenced file contents. Do not update these generated contents directly. -->

<!-- This section is automatically generated. To update it, make the appropriate changes to docs/md-magic.config.js or the embedded content, then run 'npm run build:md-magic' in the docs folder. -->
<!-- Links -->

<!-- Concepts -->
Expand Down
Loading

0 comments on commit 63b3d92

Please sign in to comment.