Skip to content

Commit

Permalink
build: Run readme generation in build (#18198)
Browse files Browse the repository at this point in the history
The scripts and tools we use to generate readme contents in the repo has
never been run as part of the main build. This PR adds a step to the
build, `build:readme` which calls markdown-magic to regen the readmes
across the repo, excluding the docs folder.

There are similar scripts in the docs package. Those don't need to be
modified; they're just a little unnecessary now.

I also updated the repo-wide policy CI workflow (the one that runs on
every PR) to no longer run the root prettier script (it's now part of
the build) and runs build:readme instead. This will catch any changes
outside the client release group, since md-magic runs repo-wide.
  • Loading branch information
tylerbutler authored Nov 7, 2023
1 parent 58c03cd commit eeb4bea
Show file tree
Hide file tree
Showing 2 changed files with 886 additions and 1 deletion.
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"build:gendocs:client:packages": "copyfiles \"packages/**/*.api.json\" ./_api-extractor-temp/doc-models/ -e \"**/node_modules/**\" -f -V",
"build:gendocs:server": "concurrently \"npm:build:gendocs:server:*\"",
"build:gendocs:server:routerlicious": "copyfiles \"server/routerlicious/**/*.api.json\" ./_api-extractor-temp/doc-models/ -e \"**/node_modules/**\" -f -V",
"build:readme": "markdown-magic --files \"**/*.md\" !docs",
"bundle-analysis:collect": "npm run webpack:profile && flub generate bundleStats",
"bundle-analysis:run": "flub run bundleStats --dangerfile build-tools/packages/build-cli/lib/lib/dangerfile.js",
"changeset": "flub changeset add --releaseGroup client",
Expand Down Expand Up @@ -153,6 +154,7 @@
"@changesets/cli": "^2.26.1",
"@fluid-private/changelog-generator-wrapper": "file:tools/changelog-generator-wrapper",
"@fluid-tools/build-cli": "^0.26.1",
"@fluid-tools/markdown-magic": "file:tools/markdown-magic",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.26.1",
"@fluidframework/eslint-config-fluid": "^3.1.0",
Expand Down Expand Up @@ -202,7 +204,8 @@
"build:docs": {
"dependsOn": [
"^build:docs",
"build:gendocs:client"
"build:gendocs:client",
"build:readme"
],
"script": false
},
Expand Down Expand Up @@ -239,6 +242,9 @@
"^ci:build:docs"
]
},
"build:readme": {
"dependsOn": []
},
"checks": {
"dependsOn": [
"^checks",
Expand Down
Loading

0 comments on commit eeb4bea

Please sign in to comment.