ci: 完善项目持续集成配置并添加 Playwright 测试
This commit is contained in:
72
package.json
72
package.json
@@ -8,16 +8,22 @@
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
},
|
||||
"scripts": {
|
||||
"_all": "run-p build-only format type-check lint",
|
||||
"dev": "vite --port 4730 --host --strictPort",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"preview:vite": "vite preview",
|
||||
"preview": "pnpm run build && wrangler dev",
|
||||
"test:unit": "vitest",
|
||||
"test:e2e": "playwright test",
|
||||
"build-only": "vite build",
|
||||
"preview": "vite preview",
|
||||
"preview:wrangler": "pnpm run build && wrangler dev",
|
||||
"test:unit": "vitest",
|
||||
"test:playwright": "playwright test",
|
||||
"test:playwright:headless": "HEADLESS=true playwright test",
|
||||
"test:playwright:ui": "playwright test --ui",
|
||||
"test:playwright:chromium": "playwright test --project=chromium",
|
||||
"type-check": "vue-tsc --build",
|
||||
"lint:oxlint": "oxlint . --fix -D correctness --ignore-path .gitignore",
|
||||
"lint:eslint": "eslint . --fix",
|
||||
"_oxlint_cfg": "oxlint . --fix --ignore-path=.gitignore --print-config",
|
||||
"__oxlint_-D": "oxlint . --fix --deny=correctness",
|
||||
"lint": "run-s lint:*",
|
||||
"format": "prettier --write src/",
|
||||
"-wrangler:pages:deploy:preview": "wrangler pages deploy dist --project-name=vue-ts-example-2025 --branch=preview",
|
||||
@@ -26,41 +32,65 @@
|
||||
"-deploy:prod": "run-s build-only wrangler:pages:deploy:prod",
|
||||
"wrangler:deploy": "pnpm run build && wrangler deploy",
|
||||
"wrangler:versions:upload": "pnpm run build && wrangler versions upload",
|
||||
"cf-typegen": "wrangler types"
|
||||
"cf-typegen": "wrangler types",
|
||||
"_dep:dedupe": "pnpm dedupe",
|
||||
"_dep:update": "pnpm dlx taze major --interactive",
|
||||
"_sizecheck:Treemap": "pnpm dlx vite-bundle-visualizer -t treemap",
|
||||
"_sizecheck:Sunburst": "pnpm dlx vite-bundle-visualizer -t sunburst",
|
||||
"_sizecheck:Network": "pnpm dlx vite-bundle-visualizer -t network",
|
||||
"_knip": "pnpm dlx knip",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"lint-staged": {
|
||||
"{src,e2e}/**/*.{js,jsx,ts,tsx,vue}": [
|
||||
"prettier --write",
|
||||
"eslint --fix",
|
||||
"oxlint --fix"
|
||||
]
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"vite": "$vite"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@commitlint/cli": "^19.8.1",
|
||||
"@commitlint/config-conventional": "^19.8.1",
|
||||
"pinia": "^3.0.3",
|
||||
"vue": "^3.5.18",
|
||||
"vue": "^3.5.21",
|
||||
"vue-router": "^4.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cloudflare/vite-plugin": "^1.12.3",
|
||||
"@playwright/test": "^1.54.1",
|
||||
"@commitlint/types": "^19.8.1",
|
||||
"@playwright/test": "^1.55.0",
|
||||
"@prettier/plugin-oxc": "^0.0.4",
|
||||
"@tsconfig/node22": "^22.0.2",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/node": "^22.16.5",
|
||||
"@types/node": "^22.18.1",
|
||||
"@vitejs/plugin-vue": "^6.0.1",
|
||||
"@vitejs/plugin-vue-jsx": "^5.0.1",
|
||||
"@vitest/eslint-plugin": "^1.3.4",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.1",
|
||||
"@vitest/eslint-plugin": "^1.3.9",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"@vue/eslint-config-typescript": "^14.6.0",
|
||||
"@vue/test-utils": "^2.4.6",
|
||||
"@vue/tsconfig": "^0.7.0",
|
||||
"eslint": "^9.31.0",
|
||||
"eslint-plugin-oxlint": "~1.8.0",
|
||||
"eslint-plugin-playwright": "^2.2.0",
|
||||
"eslint-plugin-vue": "~10.3.0",
|
||||
"jiti": "^2.4.2",
|
||||
"@vue/tsconfig": "^0.8.1",
|
||||
"eslint": "^9.35.0",
|
||||
"eslint-plugin-oxlint": "~1.14.0",
|
||||
"eslint-plugin-playwright": "^2.2.2",
|
||||
"eslint-plugin-vue": "~10.4.0",
|
||||
"husky": "^9.1.7",
|
||||
"jiti": "^2.5.1",
|
||||
"jsdom": "^26.1.0",
|
||||
"lint-staged": "^16.1.6",
|
||||
"npm-run-all2": "^8.0.4",
|
||||
"oxlint": "~1.8.0",
|
||||
"oxlint": "~1.14.0",
|
||||
"prettier": "3.6.2",
|
||||
"typescript": "~5.8.0",
|
||||
"vite": "npm:rolldown-vite@latest",
|
||||
"vite-plugin-vue-devtools": "^8.0.0",
|
||||
"typescript": "~5.9.2",
|
||||
"vite": "npm:rolldown-vite@^7.1.8",
|
||||
"vite-plugin-vue-devtools": "^8.0.1",
|
||||
"vitest": "^3.2.4",
|
||||
"vue-tsc": "^3.0.4",
|
||||
"vue-tsc": "^3.0.6",
|
||||
"wrangler": "^4.34.0"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user