chore: configure project with src/ directory structure and tooling

- Move app files into src/ directory following Next.js convention
- Add baseUrl: src/ to tsconfig.json for path resolution
- Add .vscode/launch.json with debug configs for dev/build/start/lint
- Add lint:fix npm script to package.json
This commit is contained in:
2026-06-08 11:04:42 +08:00
parent 6e15715e67
commit 14d6e7c41e
8 changed files with 53 additions and 1 deletions
+50
View File
@@ -0,0 +1,50 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: dev",
"type": "node",
"request": "launch",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["run", "dev"],
"console": "integratedTerminal"
},
{
"name": "Next.js: build",
"type": "node",
"request": "launch",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["run", "build"],
"console": "integratedTerminal"
},
{
"name": "Next.js: start",
"type": "node",
"request": "launch",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["run", "start"],
"console": "integratedTerminal",
"serverReadyAction": {
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"action": "openExternally"
}
},
{
"name": "Next.js: lint",
"type": "node",
"request": "launch",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["run", "lint"],
"console": "integratedTerminal"
},
{
"name": "Next.js: lint:fix",
"type": "node",
"request": "launch",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["run", "lint:fix"],
"console": "integratedTerminal"
}
]
}
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

+2 -1
View File
@@ -6,7 +6,8 @@
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "eslint" "lint": "eslint",
"lint:fix": "eslint --fix"
}, },
"dependencies": { "dependencies": {
"next": "16.2.7", "next": "16.2.7",
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File
+1
View File
@@ -13,6 +13,7 @@
"isolatedModules": true, "isolatedModules": true,
"jsx": "react-jsx", "jsx": "react-jsx",
"incremental": true, "incremental": true,
"baseUrl": "src/",
"plugins": [ "plugins": [
{ {
"name": "next" "name": "next"