pandax 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -0
- package/bin/pandax.js +592 -0
- package/package.json +33 -0
- package/skills/pandax-frontend-api-mock/SKILL.md +62 -0
- package/skills/pandax-frontend-architecture/SKILL.md +1239 -0
- package/skills/pandax-frontend-component-review/SKILL.md +114 -0
- package/skills/pandax-frontend-requirement/SKILL.md +142 -0
- package/skills/pandax-frontend-standards/SKILL.md +468 -0
- package/skills/pandax-frontend-use-modal/SKILL.md +621 -0
- package/templates/pandax-monorepo/.editorconfig +16 -0
- package/templates/pandax-monorepo/.husky/commit-msg +2 -0
- package/templates/pandax-monorepo/.husky/pre-commit +2 -0
- package/templates/pandax-monorepo/.prettierrc.json +28 -0
- package/templates/pandax-monorepo/apps/base/env.d.ts +1 -0
- package/templates/pandax-monorepo/apps/base/index.html +13 -0
- package/templates/pandax-monorepo/apps/base/package.json +30 -0
- package/templates/pandax-monorepo/apps/base/src/App.vue +15 -0
- package/templates/pandax-monorepo/apps/base/src/layouts/default-layout/index.vue +23 -0
- package/templates/pandax-monorepo/apps/base/src/main.ts +31 -0
- package/templates/pandax-monorepo/apps/base/src/router/index.ts +22 -0
- package/templates/pandax-monorepo/apps/base/src/stores/index.ts +15 -0
- package/templates/pandax-monorepo/apps/base/src/styles/global.scss +19 -0
- package/templates/pandax-monorepo/apps/base/src/styles/variables.scss +4 -0
- package/templates/pandax-monorepo/apps/base/src/types/wujie.d.ts +16 -0
- package/templates/pandax-monorepo/apps/base/src/views/home/index.vue +21 -0
- package/templates/pandax-monorepo/apps/base/tsconfig.json +25 -0
- package/templates/pandax-monorepo/apps/base/tsconfig.node.json +11 -0
- package/templates/pandax-monorepo/apps/base/vite.config.ts +26 -0
- package/templates/pandax-monorepo/apps/main/env.d.ts +1 -0
- package/templates/pandax-monorepo/apps/main/index.html +13 -0
- package/templates/pandax-monorepo/apps/main/package.json +32 -0
- package/templates/pandax-monorepo/apps/main/src/App.vue +15 -0
- package/templates/pandax-monorepo/apps/main/src/layouts/MicroApp.vue +29 -0
- package/templates/pandax-monorepo/apps/main/src/layouts/default-layout/index.vue +48 -0
- package/templates/pandax-monorepo/apps/main/src/main.ts +27 -0
- package/templates/pandax-monorepo/apps/main/src/router/index.ts +22 -0
- package/templates/pandax-monorepo/apps/main/src/stores/index.ts +23 -0
- package/templates/pandax-monorepo/apps/main/src/styles/global.scss +23 -0
- package/templates/pandax-monorepo/apps/main/src/styles/variables.scss +8 -0
- package/templates/pandax-monorepo/apps/main/src/views/home/index.vue +25 -0
- package/templates/pandax-monorepo/apps/main/tsconfig.json +25 -0
- package/templates/pandax-monorepo/apps/main/tsconfig.node.json +11 -0
- package/templates/pandax-monorepo/apps/main/vite.config.ts +24 -0
- package/templates/pandax-monorepo/commitlint.config.js +38 -0
- package/templates/pandax-monorepo/eslint.config.js +61 -0
- package/templates/pandax-monorepo/package.json +50 -0
- package/templates/pandax-monorepo/packages/components/package.json +20 -0
- package/templates/pandax-monorepo/packages/components/src/PandaButton.vue +15 -0
- package/templates/pandax-monorepo/packages/components/src/PandaCard.vue +16 -0
- package/templates/pandax-monorepo/packages/components/src/index.ts +2 -0
- package/templates/pandax-monorepo/packages/core/package.json +20 -0
- package/templates/pandax-monorepo/packages/core/src/index.ts +2 -0
- package/templates/pandax-monorepo/packages/core/src/request.ts +24 -0
- package/templates/pandax-monorepo/packages/core/src/utils.ts +7 -0
- package/templates/pandax-monorepo/packages/hooks/package.json +19 -0
- package/templates/pandax-monorepo/packages/hooks/src/index.ts +2 -0
- package/templates/pandax-monorepo/packages/hooks/src/useCounter.ts +27 -0
- package/templates/pandax-monorepo/packages/hooks/src/useToggle.ts +19 -0
- package/templates/pandax-monorepo/packages/styles/package.json +19 -0
- package/templates/pandax-monorepo/packages/styles/src/index.ts +1 -0
- package/templates/pandax-monorepo/packages/styles/src/uno.ts +19 -0
- package/templates/pandax-monorepo/packages/styles/src/variables.scss +14 -0
- package/templates/pandax-monorepo/pnpm-workspace.yaml +32 -0
- package/templates/pandax-monorepo/turbo.json +23 -0
- package/templates/vue3/.eslintrc.cjs +16 -0
- package/templates/vue3/.prettierrc +7 -0
- package/templates/vue3/env.d.ts +1 -0
- package/templates/vue3/index.html +13 -0
- package/templates/vue3/package.json +34 -0
- package/templates/vue3/src/App.vue +14 -0
- package/templates/vue3/src/api/index.ts +27 -0
- package/templates/vue3/src/assets/.gitkeep +1 -0
- package/templates/vue3/src/components/.gitkeep +1 -0
- package/templates/vue3/src/composables/.gitkeep +1 -0
- package/templates/vue3/src/constants/.gitkeep +1 -0
- package/templates/vue3/src/directives/.gitkeep +1 -0
- package/templates/vue3/src/layouts/default-layout/index.vue +33 -0
- package/templates/vue3/src/locales/.gitkeep +1 -0
- package/templates/vue3/src/main.ts +17 -0
- package/templates/vue3/src/router/index.ts +17 -0
- package/templates/vue3/src/services/.gitkeep +1 -0
- package/templates/vue3/src/stores/index.ts +12 -0
- package/templates/vue3/src/styles/global.scss +18 -0
- package/templates/vue3/src/styles/variables.scss +17 -0
- package/templates/vue3/src/types/global.d.ts +9 -0
- package/templates/vue3/src/utils/format.ts +11 -0
- package/templates/vue3/src/views/home/index.vue +19 -0
- package/templates/vue3/tsconfig.json +25 -0
- package/templates/vue3/tsconfig.node.json +10 -0
- package/templates/vue3/vite.config.ts +20 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
html,
|
|
2
|
+
body,
|
|
3
|
+
#app {
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
body {
|
|
11
|
+
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
12
|
+
color: $text-color-primary;
|
|
13
|
+
background-color: #ffffff;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
* {
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// 全局 SCSS 变量
|
|
2
|
+
|
|
3
|
+
$primary-color: #409eff;
|
|
4
|
+
$success-color: #67c23a;
|
|
5
|
+
$warning-color: #e6a23c;
|
|
6
|
+
$danger-color: #f56c6c;
|
|
7
|
+
$info-color: #909399;
|
|
8
|
+
|
|
9
|
+
$text-color-primary: #303133;
|
|
10
|
+
$text-color-regular: #606266;
|
|
11
|
+
$text-color-secondary: #909399;
|
|
12
|
+
|
|
13
|
+
$border-color-base: #dcdfe6;
|
|
14
|
+
$border-color-light: #e4e7ed;
|
|
15
|
+
$border-color-lighter: #ebeef5;
|
|
16
|
+
|
|
17
|
+
$bg-color-base: #f5f7fa;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function formatDate(date: Date | string | number, format = 'yyyy-MM-dd'): string {
|
|
2
|
+
const d = new Date(date);
|
|
3
|
+
const year = d.getFullYear();
|
|
4
|
+
const month = `${d.getMonth() + 1}`.padStart(2, '0');
|
|
5
|
+
const day = `${d.getDate()}`.padStart(2, '0');
|
|
6
|
+
|
|
7
|
+
return format
|
|
8
|
+
.replace('yyyy', String(year))
|
|
9
|
+
.replace('MM', month)
|
|
10
|
+
.replace('dd', day);
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
const title = ref('Pandax Vue3 Template');
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="home-page">
|
|
9
|
+
<h1>{{ title }}</h1>
|
|
10
|
+
<p>Welcome to your Vue3 project.</p>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<style scoped lang="scss">
|
|
15
|
+
.home-page {
|
|
16
|
+
padding: 24px;
|
|
17
|
+
text-align: center;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"jsx": "preserve",
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true,
|
|
18
|
+
"baseUrl": ".",
|
|
19
|
+
"paths": {
|
|
20
|
+
"@/*": ["src/*"]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
|
|
24
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
25
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import vue from '@vitejs/plugin-vue';
|
|
3
|
+
import { resolve } from 'path';
|
|
4
|
+
import UnoCSS from 'unocss/vite';
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [vue(), UnoCSS()],
|
|
8
|
+
resolve: {
|
|
9
|
+
alias: {
|
|
10
|
+
'@': resolve(__dirname, 'src'),
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
css: {
|
|
14
|
+
preprocessorOptions: {
|
|
15
|
+
scss: {
|
|
16
|
+
additionalData: `@use "@/styles/variables.scss" as *;`,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|