Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Apr 9, 2023
1 parent 914eb00 commit 9e90922
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 67 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,9 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies and build for production
run: pnpm install && pnpm build
- name: Install dependencies
run: pnpm i --registry=https://registry.npmmirror.com

- name: build for production
run: nx reset && pnpm build

14 changes: 10 additions & 4 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,18 @@
},
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/nx-cloud",
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e", "check"],
"accessToken": "MjNjZTQxNDgtYzhiYy00NDg0LWIwMGQtMWJhMjZhZmFlNDc0fHJlYWQtd3JpdGU="
"cacheableOperations": []
}
}
},
// "default": {
// "runner": "@nrwl/nx-cloud",
// "options": {
// "cacheableOperations": ["build", "lint", "test", "e2e", "check"],
// "accessToken": "MjNjZTQxNDgtYzhiYy00NDg0LWIwMGQtMWJhMjZhZmFlNDc0fHJlYWQtd3JpdGU="
// }
// }
},
"defaultProject": "zhi-core",
"generators": {
Expand Down
28 changes: 0 additions & 28 deletions packages/zhi-blog-api/src/lib/custom.d.ts

This file was deleted.

3 changes: 2 additions & 1 deletion packages/zhi-blog-api/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"]
"module": "esnext",
"types": ["node", "vite/client"]
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
Expand Down
2 changes: 1 addition & 1 deletion packages/zhi-common/src/lib/ZhiUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ZhiUtil {
if (!ZhiUtil.env) {
// https://github.com/vitejs/vite/issues/9539#issuecomment-1206301266
// 1 add modules:esnext tsconfig.app.json
// 2 add custom.d.ts
// 2 add custom.d.ts or add "vite/client" to tsconfig.app.json
const envMeta = import.meta.env

const customEnv = {
Expand Down
28 changes: 0 additions & 28 deletions packages/zhi-common/src/lib/custom.d.ts

This file was deleted.

3 changes: 2 additions & 1 deletion packages/zhi-common/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"outDir": "../../dist/out-tsc",
"declaration": true,
"allowJs": true,
"types": ["node"]
"module": "esnext",
"types": ["node", "vite/client"]
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
Expand Down
3 changes: 2 additions & 1 deletion packages/zhi-server-modules-infra/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"]
"module": "esnext",
"types": ["node", "vite/client"]
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
Expand Down
3 changes: 2 additions & 1 deletion packages/zhi-siyuan-api/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"]
"module": "esnext",
"types": ["node", "vite/client"]
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
Expand Down

0 comments on commit 9e90922

Please sign in to comment.