Skip to content

Commit 061b879

Browse files
committed
docs: switch to docusaurus-plugin-typedoc-api
1 parent 3e5fce9 commit 061b879

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+665
-683
lines changed

examples/graphql-server-mikro-orm-postgres/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
"@apollo/server-plugin-landing-page-graphql-playground": "4.0.1",
3030
"@graphql-tools/merge": "9.0.0",
3131
"@graphql-tools/schema": "10.0.0",
32-
"@mikro-orm/cli": "5.8.0",
33-
"@mikro-orm/core": "5.8.0",
34-
"@mikro-orm/entity-generator": "5.8.0",
35-
"@mikro-orm/knex": "5.8.0",
36-
"@mikro-orm/migrations": "5.8.0",
37-
"@mikro-orm/postgresql": "5.8.0",
38-
"@mikro-orm/reflection": "5.8.0",
32+
"@mikro-orm/cli": "5.8.1",
33+
"@mikro-orm/core": "5.8.1",
34+
"@mikro-orm/entity-generator": "5.8.1",
35+
"@mikro-orm/knex": "5.8.1",
36+
"@mikro-orm/migrations": "5.8.1",
37+
"@mikro-orm/postgresql": "5.8.1",
38+
"@mikro-orm/reflection": "5.8.1",
3939
"graphql": "16.8.0",
4040
"graphql-modules": "2.2.0",
4141
"tslib": "2.6.2"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

modules/mikro-orm/package.json modules/module-mikro-orm/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@
6363
"@graphql-codegen/typescript-operations": "4.0.1",
6464
"@graphql-codegen/typescript-resolvers": "4.0.1",
6565
"@graphql-codegen/typescript-type-graphql": "2.3.6",
66-
"@mikro-orm/cli": "5.8.0",
67-
"@mikro-orm/core": "5.8.0",
68-
"@mikro-orm/entity-generator": "5.8.0",
69-
"@mikro-orm/knex": "5.8.0",
70-
"@mikro-orm/migrations": "5.8.0",
71-
"@mikro-orm/postgresql": "5.8.0",
72-
"@mikro-orm/reflection": "5.8.0",
66+
"@mikro-orm/cli": "5.8.1",
67+
"@mikro-orm/core": "5.8.1",
68+
"@mikro-orm/entity-generator": "5.8.1",
69+
"@mikro-orm/knex": "5.8.1",
70+
"@mikro-orm/migrations": "5.8.1",
71+
"@mikro-orm/postgresql": "5.8.1",
72+
"@mikro-orm/reflection": "5.8.1",
7373
"@types/request-ip": "0.0.38",
7474
"graphql": "16.8.0",
7575
"graphql-modules": "2.2.0",
File renamed without changes.
File renamed without changes.

modules/mongo/package.json modules/module-mongo/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@
6363
"@graphql-codegen/typescript-operations": "4.0.1",
6464
"@graphql-codegen/typescript-resolvers": "4.0.1",
6565
"@graphql-codegen/typescript-type-graphql": "2.3.6",
66-
"@mikro-orm/cli": "5.8.0",
67-
"@mikro-orm/core": "5.8.0",
68-
"@mikro-orm/entity-generator": "5.8.0",
69-
"@mikro-orm/knex": "5.8.0",
70-
"@mikro-orm/migrations": "5.8.0",
71-
"@mikro-orm/postgresql": "5.8.0",
72-
"@mikro-orm/reflection": "5.8.0",
66+
"@mikro-orm/cli": "5.8.1",
67+
"@mikro-orm/core": "5.8.1",
68+
"@mikro-orm/entity-generator": "5.8.1",
69+
"@mikro-orm/knex": "5.8.1",
70+
"@mikro-orm/migrations": "5.8.1",
71+
"@mikro-orm/postgresql": "5.8.1",
72+
"@mikro-orm/reflection": "5.8.1",
7373
"@types/request-ip": "0.0.38",
7474
"graphql": "16.8.0",
7575
"graphql-modules": "2.2.0",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
"eslint-plugin-jest": "27.2.3",
6666
"eslint-plugin-prettier": "5.0.0",
6767
"husky": "8.0.3",
68-
"jest": "29.6.4",
69-
"jest-environment-jsdom": "29.6.4",
68+
"jest": "29.7.0",
69+
"jest-environment-jsdom": "29.7.0",
7070
"lerna": "6.6.2",
7171
"lint-staged": "14.0.1",
7272
"nodemon": "3.0.1",

packages/database-mikro-orm/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
"devDependencies": {
2929
"@accounts/database-tests": "^0.32.2",
3030
"@accounts/server": "^0.33.1",
31-
"@mikro-orm/cli": "5.8.0",
32-
"@mikro-orm/core": "5.8.0",
33-
"@mikro-orm/entity-generator": "5.8.0",
34-
"@mikro-orm/knex": "5.8.0",
35-
"@mikro-orm/migrations": "5.8.0",
36-
"@mikro-orm/postgresql": "5.8.0",
37-
"@mikro-orm/reflection": "5.8.0",
31+
"@mikro-orm/cli": "5.8.1",
32+
"@mikro-orm/core": "5.8.1",
33+
"@mikro-orm/entity-generator": "5.8.1",
34+
"@mikro-orm/knex": "5.8.1",
35+
"@mikro-orm/migrations": "5.8.1",
36+
"@mikro-orm/postgresql": "5.8.1",
37+
"@mikro-orm/reflection": "5.8.1",
3838
"graphql": "16.8.0",
3939
"graphql-modules": "2.2.0"
4040
},

packages/graphql-client/codegen.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
schema:
2-
- ../../modules/core/introspection.json
3-
- ../../modules/password/introspection.json
4-
- ../../modules/magic-link/introspection.json
2+
- ../../modules/module-core/introspection.json
3+
- ../../modules/module-password/introspection.json
4+
- ../../modules/module-magic-link/introspection.json
55
documents: ./src/**/*.graphql
66
generates:
77
./src/graphql-operations.ts:

website/docusaurus.config.js

+113-77
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
// @ts-check
2-
const lightCodeTheme = require('prism-react-renderer/themes/github');
3-
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
1+
/**
2+
* Copyright (c) 2017-present, Facebook, Inc.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
47

5-
/** @type {import('@docusaurus/types').Config} */
6-
const config = {
8+
const fs = require('fs');
9+
const path = require('path');
10+
11+
/** @type {import('@docusaurus/types').DocusaurusConfig} */
12+
module.exports = {
713
title: 'accounts-js',
814
tagline: 'Fullstack authentication and accounts-management for Javascript',
915
url: 'https://www.accountsjs.com',
@@ -16,79 +22,76 @@ const config = {
1622
customFields: {
1723
repoUrl: 'https://github.com/accounts-js/accounts',
1824
},
19-
themeConfig:
20-
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
21-
({
22-
fathomAnalytics: {
23-
siteId: 'NZPJJZTJ',
24-
customDomain: 'https://goose.accountsjs.com',
25-
},
26-
prism: {
27-
theme: lightCodeTheme,
28-
darkTheme: darkCodeTheme,
25+
themeConfig: {
26+
fathomAnalytics: {
27+
siteId: 'NZPJJZTJ',
28+
customDomain: 'https://goose.accountsjs.com',
29+
},
30+
prism: {
31+
theme: require('prism-react-renderer/themes/github'),
32+
darkTheme: require('prism-react-renderer/themes/dracula'),
33+
},
34+
navbar: {
35+
logo: {
36+
alt: 'accounts.js logo',
37+
src: 'img/logo.png',
2938
},
30-
navbar: {
31-
logo: {
32-
alt: 'accounts.js logo',
33-
src: 'img/logo.png',
34-
},
3539

36-
items: [
37-
{ to: 'docs/introduction', label: 'Documentation', position: 'right' },
38-
{
39-
to: 'docs/api/server',
40-
label: 'Api reference',
41-
position: 'right',
42-
},
43-
{
44-
href: 'https://github.com/accounts-js/accounts',
45-
label: 'GitHub',
46-
position: 'right',
47-
},
48-
],
49-
},
50-
footer: {
51-
style: 'dark',
52-
links: [
53-
{
54-
title: 'Docs',
55-
items: [
56-
{
57-
label: 'Introduction',
58-
to: '/docs/introduction',
59-
},
60-
{
61-
label: 'Api reference',
62-
to: '/docs/api/server',
63-
},
64-
],
65-
},
66-
{
67-
title: 'Community',
68-
items: [
69-
{
70-
label: 'GitHub Discussions',
71-
href: 'https://github.com/accounts-js/accounts/discussions',
72-
},
73-
{
74-
label: 'Slack',
75-
href: 'https://accounts-js.slack.com',
76-
},
77-
{
78-
label: 'Twitter',
79-
href: 'https://twitter.com/accountsjs',
80-
},
81-
],
82-
},
83-
],
84-
copyright: `Copyright © ${new Date().getFullYear()} accounts-js`,
85-
},
86-
}),
40+
items: [
41+
{ to: 'docs/introduction', label: 'Documentation', position: 'right' },
42+
{
43+
label: 'Api reference',
44+
to: 'api',
45+
position: 'right',
46+
},
47+
{
48+
href: 'https://github.com/accounts-js/accounts',
49+
label: 'GitHub',
50+
position: 'right',
51+
},
52+
],
53+
},
54+
footer: {
55+
style: 'dark',
56+
links: [
57+
{
58+
title: 'Docs',
59+
items: [
60+
{
61+
label: 'Introduction',
62+
to: '/docs/introduction',
63+
},
64+
{
65+
label: 'Api reference',
66+
to: 'api',
67+
},
68+
],
69+
},
70+
{
71+
title: 'Community',
72+
items: [
73+
{
74+
label: 'GitHub Discussions',
75+
href: 'https://github.com/accounts-js/accounts/discussions',
76+
},
77+
{
78+
label: 'Slack',
79+
href: 'https://accounts-js.slack.com',
80+
},
81+
{
82+
label: 'Twitter',
83+
href: 'https://twitter.com/accountsjs',
84+
},
85+
],
86+
},
87+
],
88+
copyright: `Copyright © ${new Date().getFullYear()} accounts-js`,
89+
},
90+
},
8791
presets: [
8892
[
8993
'@docusaurus/preset-classic',
90-
/** @type {import('@docusaurus/preset-classic').Options} */
91-
({
94+
{
9295
docs: {
9396
sidebarPath: require.resolve('./sidebars.js'),
9497
editUrl: 'https://github.com/accounts-js/accounts/edit/master/website/',
@@ -97,10 +100,43 @@ const config = {
97100
theme: {
98101
customCss: require.resolve('./src/css/custom.css'),
99102
},
100-
}),
103+
},
104+
],
105+
],
106+
plugins: [
107+
require.resolve('docusaurus-plugin-fathom'),
108+
[
109+
'docusaurus-plugin-typedoc-api',
110+
{
111+
projectRoot: `${__dirname}/..`,
112+
changelogs: true,
113+
packages: fs
114+
.readdirSync(path.resolve(__dirname, '..', 'packages'))
115+
.map((name) => `packages/${name}`)
116+
.concat(
117+
fs
118+
.readdirSync(path.resolve(__dirname, '..', 'modules'))
119+
.map((name) => `modules/${name}`)
120+
),
121+
exclude: [
122+
'packages/database-tests',
123+
'packages/e2e',
124+
'packages/error',
125+
'packages/types',
126+
'modules/module-magic-link',
127+
'modules/module-password',
128+
],
129+
typedocOptions: {
130+
readme: 'none',
131+
tsconfig: '../tsconfig.json',
132+
excludeExternals: true,
133+
excludePrivate: true,
134+
excludeProtected: true,
135+
excludeInternal: true,
136+
externalPattern: '**/node_modules/*',
137+
cleanOutputDir: true,
138+
},
139+
},
101140
],
102141
],
103-
plugins: [require.resolve('docusaurus-plugin-fathom')],
104142
};
105-
106-
module.exports = config;

website/package.json

+6-12
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,15 @@
1111
"clear": "docusaurus clear",
1212
"serve": "docusaurus serve",
1313
"write-translations": "docusaurus write-translations",
14-
"write-heading-ids": "docusaurus write-heading-ids",
15-
"generate-api-docs": "rm -rf docs/api && yarn run -T ts-node scripts/generate-api-docs.ts"
14+
"write-heading-ids": "docusaurus write-heading-ids"
1615
},
1716
"dependencies": {
1817
"@docusaurus/core": "2.4.1",
19-
"@docusaurus/plugin-content-docs": "2.4.1",
2018
"@docusaurus/preset-classic": "2.4.1",
21-
"@mdx-js/react": "1.6.22",
22-
"clsx": "1.2.1",
2319
"docusaurus-plugin-fathom": "1.1.0",
24-
"prism-react-renderer": "1.3.5",
25-
"react": "17.0.2",
26-
"react-dom": "17.0.2"
20+
"docusaurus-plugin-typedoc-api": "3.0.0",
21+
"react": "18.2.0",
22+
"react-dom": "18.2.0"
2723
},
2824
"browserslist": {
2925
"production": [
@@ -38,9 +34,7 @@
3834
]
3935
},
4036
"devDependencies": {
41-
"@types/react": "17.0.65",
42-
"typedoc": "0.19.2",
43-
"typedoc-plugin-markdown": "2.4.2",
44-
"typescript": "4.0.8"
37+
"@types/react": "18.2.21",
38+
"typescript": "5.0.4"
4539
}
4640
}

0 commit comments

Comments
 (0)