refactor: 悦码项目重构
This commit is contained in:
1
packages/shared/constants/index.ts
Normal file
1
packages/shared/constants/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const PORT = 8080;
|
||||
21
packages/shared/package.json
Normal file
21
packages/shared/package.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "@sy/low-code-shared",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"main": "./dist/src/index.js",
|
||||
"types": "./dist/src/index.d.ts",
|
||||
"exports": {
|
||||
".": "./dist/src/index.js",
|
||||
"./constants": "./dist/src/constants/index.js",
|
||||
"./styles/reset.css": "./src/styles/reset.css"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rimraf dist && tsc",
|
||||
"clean:lock": "rimraf pnpm-lock.yaml && rimraf package.lock.json",
|
||||
"clean:lib": "rimraf node_modules"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rimraf": "^6.0.1",
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
}
|
||||
1
packages/shared/src/index.ts
Normal file
1
packages/shared/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../constants";
|
||||
51
packages/shared/styles/reset.css
Normal file
51
packages/shared/styles/reset.css
Normal file
@@ -0,0 +1,51 @@
|
||||
/* 现代 CSS 重置方案(推荐最佳实践) */
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box; /* 1. 使用更直观的盒模型 */
|
||||
margin: 0; /* 2. 清除默认外边距 */
|
||||
padding: 0; /* 3. 清除默认内边距 */
|
||||
}
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth; /* 4. 平滑滚动 */
|
||||
-webkit-text-size-adjust: 100%; /* 5. 防止字体缩放 */
|
||||
-webkit-font-smoothing: antialiased; /* 6. 字体抗锯齿 */
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
line-height: 1.5;
|
||||
text-rendering: optimizeSpeed; /* 7. 优化文本渲染 */
|
||||
}
|
||||
|
||||
ul[role="list"],
|
||||
ol[role="list"] {
|
||||
list-style: none; /* 8. 清除列表样式(保留语义) */
|
||||
}
|
||||
|
||||
a:not([class]) {
|
||||
text-decoration-skip-ink: auto; /* 9. 链接下划线优化 */
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
display: block; /* 10. 消除图片底部间隙 */
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font: inherit; /* 11. 表单元素字体继承 */
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
||||
12
packages/shared/tsconfig.json
Normal file
12
packages/shared/tsconfig.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"module": "ESNext",
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"useUnknownInCatchVariables": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user