Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,150 changes: 1,088 additions & 1,062 deletions .42c/scan/realworld-conduit-api/scanconf.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_BASE_URL='https://api.realworld.show/api'
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ jobs:

# 第六步:类型检查(TypeScript)
- name: Type check
run: pnpm type-check

run: pnpm exec vue-tsc -p tsconfig.app.json --noEmit
# 第七步:运行单元测试和组件测试(Vitest)
- name: Unit & component tests
run: pnpm test:run
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ This project will include basic features such as user authentication, user profi
* I created basic stores and set up Vue Router today.
* I also added a simple test and got a feel for the CI workflow.
* With the help of AI, I drafted a deployment workflow.
* I don't fully understand the deployment file yet, but I'm digging into them and the YAML syntax.
* I don't fully understand the deployment file yet, but I'm digging into them and the YAML syntax.

### DAY3
* I wrote and tested an HTTP request mock.
* I explored some configuration files to get familiar with the basic setup.
* I haven't started writing actual components or logic yet. I'm focusing on getting familiar with the basic structure of a frontend project.
* My CI workflow failed. I created a new account to be my reviewer. However, when I approved the pull request through my new account, the dev branch wasn't merged into the main branch. I'm not sure why this happened, so I decided to disable the rule set temporarily.
36 changes: 36 additions & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* eslint-disable */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
// biome-ignore lint: disable
export {}

/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
Article: typeof import('./src/components/Article.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElInput: typeof import('element-plus/es')['ElInput']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElTag: typeof import('element-plus/es')['ElTag']
Footer: typeof import('./src/components/Footer.vue')['default']
GlobalFeed: typeof import('./src/components/GlobalFeed.vue')['default']
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
Home: typeof import('./src/components/Home.vue')['default']
Layout: typeof import('./src/components/Layout.vue')['default']
Login: typeof import('./src/components/Login.vue')['default']
Me: typeof import('./src/components/Me.vue')['default']
Navbar: typeof import('./src/components/Navbar.vue')['default']
NewArticle: typeof import('./src/components/NewArticle.vue')['default']
Register: typeof import('./src/components/Register.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Setting: typeof import('./src/components/Setting.vue')['default']
YourFeed: typeof import('./src/components/YourFeed.vue')['default']
}
}
Empty file added mock/browser.ts
Empty file.
18 changes: 18 additions & 0 deletions mock/handlers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { http, HttpResponse } from 'msw'
interface User {
email: string;
password: string;
username: string;
}
// simulate the register workflow.
export const handlers = [
http.get('http://localhost:5173/user', async () => {
return HttpResponse.json({
email: '[email protected]',
token: 'TEST',
username: 'xxx',
bio: 'bio desc',
image: 'img'
})
})
]
4 changes: 4 additions & 0 deletions mock/node.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { setupServer } from 'msw/node'
import { handlers } from './handlers'

export const server = setupServer(...handlers)
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
]
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.2",
"@types/path-browserify": "^1.0.3",
"axios": "^1.11.0",
"element-plus": "^2.11.1",
"path-browserify": "^1.0.1",
"pinia": "^3.0.3",
"url": "^0.11.4",
"vue": "^3.5.18",
"vue-router": "^4.5.1"
},
Expand All @@ -46,10 +50,13 @@
"husky": "^9.1.7",
"jsdom": "^26.1.0",
"lint-staged": "^16.1.6",
"msw": "^2.11.1",
"prettier": "^3.6.2",
"prettier-plugin-tailwindcss": "^0.6.14",
"tailwindcss": "^4.1.12",
"typescript": "^5.8.3",
"unplugin-auto-import": "^20.1.0",
"unplugin-vue-components": "^29.0.0",
"vite": "^7.1.2",
"vitest": "^3.2.4",
"vue-tsc": "^3.0.5"
Expand Down
Loading
Loading