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.
Files changed (90) hide show
  1. package/README.md +83 -0
  2. package/bin/pandax.js +592 -0
  3. package/package.json +33 -0
  4. package/skills/pandax-frontend-api-mock/SKILL.md +62 -0
  5. package/skills/pandax-frontend-architecture/SKILL.md +1239 -0
  6. package/skills/pandax-frontend-component-review/SKILL.md +114 -0
  7. package/skills/pandax-frontend-requirement/SKILL.md +142 -0
  8. package/skills/pandax-frontend-standards/SKILL.md +468 -0
  9. package/skills/pandax-frontend-use-modal/SKILL.md +621 -0
  10. package/templates/pandax-monorepo/.editorconfig +16 -0
  11. package/templates/pandax-monorepo/.husky/commit-msg +2 -0
  12. package/templates/pandax-monorepo/.husky/pre-commit +2 -0
  13. package/templates/pandax-monorepo/.prettierrc.json +28 -0
  14. package/templates/pandax-monorepo/apps/base/env.d.ts +1 -0
  15. package/templates/pandax-monorepo/apps/base/index.html +13 -0
  16. package/templates/pandax-monorepo/apps/base/package.json +30 -0
  17. package/templates/pandax-monorepo/apps/base/src/App.vue +15 -0
  18. package/templates/pandax-monorepo/apps/base/src/layouts/default-layout/index.vue +23 -0
  19. package/templates/pandax-monorepo/apps/base/src/main.ts +31 -0
  20. package/templates/pandax-monorepo/apps/base/src/router/index.ts +22 -0
  21. package/templates/pandax-monorepo/apps/base/src/stores/index.ts +15 -0
  22. package/templates/pandax-monorepo/apps/base/src/styles/global.scss +19 -0
  23. package/templates/pandax-monorepo/apps/base/src/styles/variables.scss +4 -0
  24. package/templates/pandax-monorepo/apps/base/src/types/wujie.d.ts +16 -0
  25. package/templates/pandax-monorepo/apps/base/src/views/home/index.vue +21 -0
  26. package/templates/pandax-monorepo/apps/base/tsconfig.json +25 -0
  27. package/templates/pandax-monorepo/apps/base/tsconfig.node.json +11 -0
  28. package/templates/pandax-monorepo/apps/base/vite.config.ts +26 -0
  29. package/templates/pandax-monorepo/apps/main/env.d.ts +1 -0
  30. package/templates/pandax-monorepo/apps/main/index.html +13 -0
  31. package/templates/pandax-monorepo/apps/main/package.json +32 -0
  32. package/templates/pandax-monorepo/apps/main/src/App.vue +15 -0
  33. package/templates/pandax-monorepo/apps/main/src/layouts/MicroApp.vue +29 -0
  34. package/templates/pandax-monorepo/apps/main/src/layouts/default-layout/index.vue +48 -0
  35. package/templates/pandax-monorepo/apps/main/src/main.ts +27 -0
  36. package/templates/pandax-monorepo/apps/main/src/router/index.ts +22 -0
  37. package/templates/pandax-monorepo/apps/main/src/stores/index.ts +23 -0
  38. package/templates/pandax-monorepo/apps/main/src/styles/global.scss +23 -0
  39. package/templates/pandax-monorepo/apps/main/src/styles/variables.scss +8 -0
  40. package/templates/pandax-monorepo/apps/main/src/views/home/index.vue +25 -0
  41. package/templates/pandax-monorepo/apps/main/tsconfig.json +25 -0
  42. package/templates/pandax-monorepo/apps/main/tsconfig.node.json +11 -0
  43. package/templates/pandax-monorepo/apps/main/vite.config.ts +24 -0
  44. package/templates/pandax-monorepo/commitlint.config.js +38 -0
  45. package/templates/pandax-monorepo/eslint.config.js +61 -0
  46. package/templates/pandax-monorepo/package.json +50 -0
  47. package/templates/pandax-monorepo/packages/components/package.json +20 -0
  48. package/templates/pandax-monorepo/packages/components/src/PandaButton.vue +15 -0
  49. package/templates/pandax-monorepo/packages/components/src/PandaCard.vue +16 -0
  50. package/templates/pandax-monorepo/packages/components/src/index.ts +2 -0
  51. package/templates/pandax-monorepo/packages/core/package.json +20 -0
  52. package/templates/pandax-monorepo/packages/core/src/index.ts +2 -0
  53. package/templates/pandax-monorepo/packages/core/src/request.ts +24 -0
  54. package/templates/pandax-monorepo/packages/core/src/utils.ts +7 -0
  55. package/templates/pandax-monorepo/packages/hooks/package.json +19 -0
  56. package/templates/pandax-monorepo/packages/hooks/src/index.ts +2 -0
  57. package/templates/pandax-monorepo/packages/hooks/src/useCounter.ts +27 -0
  58. package/templates/pandax-monorepo/packages/hooks/src/useToggle.ts +19 -0
  59. package/templates/pandax-monorepo/packages/styles/package.json +19 -0
  60. package/templates/pandax-monorepo/packages/styles/src/index.ts +1 -0
  61. package/templates/pandax-monorepo/packages/styles/src/uno.ts +19 -0
  62. package/templates/pandax-monorepo/packages/styles/src/variables.scss +14 -0
  63. package/templates/pandax-monorepo/pnpm-workspace.yaml +32 -0
  64. package/templates/pandax-monorepo/turbo.json +23 -0
  65. package/templates/vue3/.eslintrc.cjs +16 -0
  66. package/templates/vue3/.prettierrc +7 -0
  67. package/templates/vue3/env.d.ts +1 -0
  68. package/templates/vue3/index.html +13 -0
  69. package/templates/vue3/package.json +34 -0
  70. package/templates/vue3/src/App.vue +14 -0
  71. package/templates/vue3/src/api/index.ts +27 -0
  72. package/templates/vue3/src/assets/.gitkeep +1 -0
  73. package/templates/vue3/src/components/.gitkeep +1 -0
  74. package/templates/vue3/src/composables/.gitkeep +1 -0
  75. package/templates/vue3/src/constants/.gitkeep +1 -0
  76. package/templates/vue3/src/directives/.gitkeep +1 -0
  77. package/templates/vue3/src/layouts/default-layout/index.vue +33 -0
  78. package/templates/vue3/src/locales/.gitkeep +1 -0
  79. package/templates/vue3/src/main.ts +17 -0
  80. package/templates/vue3/src/router/index.ts +17 -0
  81. package/templates/vue3/src/services/.gitkeep +1 -0
  82. package/templates/vue3/src/stores/index.ts +12 -0
  83. package/templates/vue3/src/styles/global.scss +18 -0
  84. package/templates/vue3/src/styles/variables.scss +17 -0
  85. package/templates/vue3/src/types/global.d.ts +9 -0
  86. package/templates/vue3/src/utils/format.ts +11 -0
  87. package/templates/vue3/src/views/home/index.vue +19 -0
  88. package/templates/vue3/tsconfig.json +25 -0
  89. package/templates/vue3/tsconfig.node.json +10 -0
  90. 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,9 @@
1
+ declare interface Window {
2
+ __APP__: Record<string, unknown>;
3
+ }
4
+
5
+ declare module '*.vue' {
6
+ import type { DefineComponent } from 'vue';
7
+ const component: DefineComponent<{}, {}, any>;
8
+ export default component;
9
+ }
@@ -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,10 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true
8
+ },
9
+ "include": ["vite.config.ts"]
10
+ }
@@ -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
+ });