-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kangrui Ye <[email protected]>
- Loading branch information
1 parent
70f8b56
commit cfb1ed1
Showing
20 changed files
with
725 additions
and
1,029 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: volta-cli/[email protected] | ||
- name: Install | ||
run: yarn install --immutable --immutable-cache --check-cache | ||
- name: Build | ||
run: yarn run build | ||
- name: Test | ||
run: yarn run test | ||
- name: Lint | ||
run: yarn run lint | ||
- name: Generate docs | ||
run: yarn run generate:docs | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: volta-cli/[email protected] | ||
- name: Install | ||
run: yarn install --immutable --immutable-cache --check-cache | ||
- name: Generate docs | ||
run: yarn run generate:docs | ||
- name: Build | ||
run: yarn run build | ||
- name: Test | ||
run: yarn run test | ||
- name: Lint | ||
run: yarn run lint |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import {defineConfig, DefaultTheme} from 'vitepress'; | ||
import akitaReadItems from '../api/akita-read/typedoc-sidebar.json'; | ||
import angularDisplayItems from '../api/angular-display/typedoc-sidebar.json'; | ||
import angularLoggerItems from '../api/angular-logger/typedoc-sidebar.json'; | ||
import angularTeleportItems from '../api/angular-teleport/typedoc-sidebar.json'; | ||
import concurrencyUtilsItems from '../api/concurrency-utils/typedoc-sidebar.json'; | ||
import loggerItems from '../api/logger/typedoc-sidebar.json'; | ||
import rxjsReadItems from '../api/rxjs-read/typedoc-sidebar.json'; | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: 'Cloudflight Js Utils', | ||
description: 'Documentation page for Cloudflight Js Utils', | ||
themeConfig: { | ||
sidebar: { | ||
'/api/akita-read/': [ | ||
{ | ||
text: 'Akita Read', | ||
link: '/api/akita-read/', | ||
items: removeDuplicateItems(akitaReadItems as unknown as DefaultTheme.SidebarItem[]), | ||
}, | ||
], | ||
'/api/angular-display/': [ | ||
{ | ||
text: 'Angular Display', | ||
link: '/api/angular-display/', | ||
items: removeDuplicateItems(angularDisplayItems as unknown as DefaultTheme.SidebarItem[]), | ||
}, | ||
], | ||
'/api/angular-logger/': [ | ||
{ | ||
text: 'Angular Logger', | ||
link: '/api/angular-logger/', | ||
items: removeDuplicateItems(angularLoggerItems as unknown as DefaultTheme.SidebarItem[]), | ||
}, | ||
], | ||
'/api/angular-teleport/': [ | ||
{ | ||
text: 'Angular Teleport', | ||
link: '/api/angular-teleport/', | ||
items: removeDuplicateItems(angularTeleportItems as unknown as DefaultTheme.SidebarItem[]), | ||
}, | ||
], | ||
'/api/concurrency-utils/': [ | ||
{ | ||
text: 'Concurrency Utils', | ||
link: '/api/concurrency-utils/', | ||
items: removeDuplicateItems(concurrencyUtilsItems as unknown as DefaultTheme.SidebarItem[]), | ||
}, | ||
], | ||
'/api/logger/': [ | ||
{ | ||
text: 'Logger', | ||
link: '/api/logger/', | ||
items: removeDuplicateItems(loggerItems as unknown as DefaultTheme.SidebarItem[]), | ||
}, | ||
], | ||
'/api/rxjs-read/': [ | ||
{ | ||
text: 'Rxjs Read', | ||
link: '/api/rxjs-read/', | ||
items: removeDuplicateItems(rxjsReadItems as unknown as DefaultTheme.SidebarItem[]), | ||
}, | ||
], | ||
}, | ||
socialLinks: [{icon: 'github', link: 'https://github.com/cloudflightio/cloudflight-js-utils'}], | ||
}, | ||
// we need to put it in the subfolder otherwise serving with Nx does not work correctly | ||
outDir: '../../../dist/apps/documentation/cloudflight-js-utils', | ||
}); | ||
|
||
function removeDuplicateItems(items: DefaultTheme.SidebarItem[]): DefaultTheme.SidebarItem[] { | ||
return items.reduce<DefaultTheme.SidebarItem[]>((acc, item) => { | ||
if (acc.some((existingItem) => existingItem.link === item.link)) { | ||
return acc; | ||
} | ||
|
||
return [...acc, item]; | ||
}, []); | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../../dist/out-tsc", | ||
"types": ["node"] | ||
}, | ||
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], | ||
"include": ["**/*.ts", "src/.vuepress/config.ts"] | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../../dist/out-tsc", | ||
"types": ["node"], | ||
"resolveJsonModule": true, | ||
"allowSyntheticDefaultImports": true | ||
}, | ||
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], | ||
"include": ["**/*.ts", "src/.vitepress/config.ts"] | ||
} |
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
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
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
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
Oops, something went wrong.