Skip to content

Commit

Permalink
docs: embed generated api documents (remirror#1257)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocavue authored Sep 23, 2021
1 parent 431f852 commit 93c68aa
Show file tree
Hide file tree
Showing 16 changed files with 130 additions and 232 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,19 @@ jobs:
- name: setup node.js
uses: actions/setup-node@v2
with:
# Uses node 14 to allow nullish coalescing in `.js` files
node-version: 14
node-version: 16

- name: install and audit
uses: ./support/actions/pnpm
with:
cache: ${{ env.PNPM_CACHE_FOLDER }}

- name: generate .d.ts files
run: pnpm build

- name: generate api markdown files
run: pnpm api

- name: build docs
run: pnpm build:docs

Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,14 @@ support/api/**
/commitlint.config.js
/jest-playwright.config.cjs
/jest.config.e2e.js
/api-documenter.json

## Ignore tsconfig files since all tsconfig files are autogenerated.
/tsconfig.json
/tsconfig.dev.json
/tsconfig.lint.json
/tsconfig.docs.json

## Storybook
**/storybook-static

/typedoc.json

.linaria-cache
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"type": "module",
"scripts": {
"api": "node support/scripts/generate-api && api-documenter markdown -i ./support/api -o ./docs/api",
"api": "node support/scripts/generate-api && api-documenter generate -i ./support/api -o ./docs/api",
"browser:coverage": "browserslist --coverage",
"build": "run-p build:core css:copy",
"build:core": "preconstruct build",
Expand Down Expand Up @@ -143,8 +143,8 @@
"@lingui/macro": "^3.10.2",
"@lingui/react": "^3.10.2",
"@manypkg/cli": "^0.18.0",
"@microsoft/api-documenter": "^7.13.50",
"@microsoft/api-extractor": "^7.18.4",
"@microsoft/api-documenter": "^7.13.52",
"@microsoft/api-extractor": "^7.18.9",
"@preconstruct/cli": "^2.0.7",
"@size-limit/preset-big-lib": "^5.0.1",
"@testing-library/dom": "^8.1.0",
Expand Down Expand Up @@ -175,6 +175,7 @@
"cpy-cli": "^3.1.1",
"cross-env": "^7.0.3",
"delay": "^5.0.0",
"doc-plugin-remirror": "^0.2.1",
"downlevel-dts": "^0.7.0",
"eslint": "^7.30.0",
"eslint-config-prettier": "^8.2.0",
Expand Down
80 changes: 32 additions & 48 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions support/root/api-documenter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"outputTarget": "markdown",
"plugins": [
{
"packageName": "doc-plugin-remirror",
"enabledFeatureNames": ["remirror-feature"]
}
]
}
26 changes: 0 additions & 26 deletions support/root/tsconfig.docs.json

This file was deleted.

94 changes: 0 additions & 94 deletions support/root/typedoc.json

This file was deleted.

4 changes: 0 additions & 4 deletions support/scripts/create-typedoc-sidebars/package.json

This file was deleted.

Loading

0 comments on commit 93c68aa

Please sign in to comment.