Skip to content

Commit

Permalink
chore: got typedoc working on @kksh/api
Browse files Browse the repository at this point in the history
  • Loading branch information
HuakunShen committed Nov 3, 2024
1 parent b933524 commit 871c7fa
Show file tree
Hide file tree
Showing 13 changed files with 226 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
- name: Install Dependencies
run: pnpm install
- name: Setup
run: pnpm run setup
run: pnpm prepare
- name: Build
run: pnpm run build
run: pnpm build
- name: Test
run: pnpm run test
run: pnpm test
2 changes: 1 addition & 1 deletion .github/workflows/manifest-schema-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Dependencies
run: pnpm install
- name: Setup
run: pnpm run setup
run: pnpm prepare
- name: Update Schema
env:
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If you are interested in contributing to the project, please read the following
```bash
git clone https://github.com/kunkunsh/kunkun.git --recursive
pnpm install
pnpm run setup
pnpm prepare
```

### Run Desktop App
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": "turbo build",
"dev": "turbo dev",
"test": "turbo run test",
"setup": "turbo run setup",
"prepare": "turbo run prepare",
"lint": "turbo lint",
"format": "prettier --write \"**/*.{ts,tsx,md,svelte}\""
},
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build:docs": "npx typedoc",
"dev": "bun --watch build.ts",
"build": "bun build.ts",
"setup": "bun setup.ts",
"prepare": "bun setup.ts",
"format": "prettier --write \"**/*.{ts,tsx,md,vue,json,yaml,yml}\""
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/api/setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { $ } from "bun"

// Generate deno.d.ts under packages/api
const denoTypes = await $`deno types`.text()
let denoTypes = await $`deno types`.text()
// grep to filter out the line in denoTypes that contains "no-default-lib"
denoTypes = denoTypes.split("\n").filter((line) => !line.includes("no-default-lib")).join("\n")
Bun.write("deno.d.ts", denoTypes)
1 change: 1 addition & 0 deletions packages/api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "../typescript-config/base.json",
"compilerOptions": {
// Enable latest features
"lib": ["ESNext", "DOM"],
Expand Down
5 changes: 0 additions & 5 deletions packages/api/tsconfig.typedoc.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/ci/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"module": "index.ts",
"type": "module",
"scripts": {
"setup": "bun scripts/setup.ts"
"prepare": "bun scripts/setup.ts"
},
"devDependencies": {
"@types/bun": "latest",
Expand Down
2 changes: 1 addition & 1 deletion packages/supabase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@kksh/supabase",
"type": "module",
"scripts": {
"setup": "bun setup.ts"
"prepare": "bun setup.ts"
},
"exports": {
".": "./src/index.ts"
Expand Down
7 changes: 6 additions & 1 deletion packages/typescript-config/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@
"baseUrl": "../../",
"paths": {
"@kksh/ui/*": ["./packages/ui/*"],
"@kksh/ui": ["./packages/ui"],
"@kksh/desktop/*": ["./apps/desktop/*"],
"@kksh/desktop": ["./apps/desktop"],
"@kksh/ci/*": ["./packages/ci/*"],
"@kksh/ci": ["./packages/ci"],
"@kksh/supabase/*": ["./packages/supabase/*"],
"@kksh/schema/*": ["./packages/schema/*"]
"@kksh/supabase": ["./packages/supabase"],
"@kksh/schema/*": ["./packages/schema/*"],
"@kksh/schema": ["./packages/schema"]
}
}
}
208 changes: 205 additions & 3 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"test": {
"dependsOn": ["^test"]
},
"setup": {
"dependsOn": ["^setup"]
"prepare": {
"dependsOn": ["^prepare"]
},
"dev": {
"cache": false,
Expand Down

0 comments on commit 871c7fa

Please sign in to comment.