@component-hook/create-app 1.1.2 → 1.1.4

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 (68) hide show
  1. package/README.md +6 -4
  2. package/dist/index.js +27 -23
  3. package/package.json +3 -3
  4. package/template-react/.vscode/extensions.json +9 -0
  5. package/template-react/.vscode/settings.json +24 -0
  6. package/template-react/README.md.art +86 -0
  7. package/template-react/eslint.config.js +18 -0
  8. package/template-react/index.html.art +13 -0
  9. package/template-react/lint-staged.config.js +6 -0
  10. package/template-react/package.json +68 -0
  11. package/template-react/pnpm-lock.yaml +9897 -0
  12. package/template-react/public/vite.svg +1 -0
  13. package/template-react/src/App.tsx +6 -0
  14. package/template-react/src/__tests__/e2e/home.spec.ts +40 -0
  15. package/template-react/src/__tests__/unit/pages/home/components/HelloWorld.test.tsx +45 -0
  16. package/template-react/src/__tests__/unit/pages/home/index.test.tsx +19 -0
  17. package/template-react/src/__tests__/unit/render/index.tsx +15 -0
  18. package/template-react/src/assets/svg-icons/react.svg +1 -0
  19. package/template-react/src/components/common/index.ts +1 -0
  20. package/template-react/src/components/common/svg-icon/index.ts +1 -0
  21. package/template-react/src/components/common/svg-icon/src/index.tsx +23 -0
  22. package/template-react/src/main.tsx +26 -0
  23. package/template-react/src/mocks/browser.ts +4 -0
  24. package/template-react/src/mocks/handlers/index.ts +1 -0
  25. package/template-react/src/mocks/server.ts +4 -0
  26. package/template-react/src/pages/home/components/hello-world/index.tsx +47 -0
  27. package/template-react/src/pages/home/index.module.css +8 -0
  28. package/template-react/src/pages/home/index.tsx +37 -0
  29. package/template-react/src/plugins/i18n/index.ts +15 -0
  30. package/template-react/src/plugins/i18n/locales/en-US.json +3 -0
  31. package/template-react/src/plugins/i18n/locales/zh-TW.json +3 -0
  32. package/template-react/src/router/index.tsx +22 -0
  33. package/template-react/src/stores/constants.ts +1 -0
  34. package/template-react/src/stores/index.ts +1 -0
  35. package/template-react/src/stores/middleware.ts +17 -0
  36. package/template-react/src/stores/modules/config.ts +25 -0
  37. package/template-react/src/styles/base.css +68 -0
  38. package/template-react/src/styles/common/all.css +1 -0
  39. package/template-react/src/styles/common/button.css +26 -0
  40. package/template-react/src/styles/index.css +3 -0
  41. package/template-react/src/styles/tailwind.css +14 -0
  42. package/template-react/src/vite-env.d.ts +9 -0
  43. package/template-react/tsconfig.app.json +32 -0
  44. package/template-react/tsconfig.vitest.json +10 -0
  45. package/template-react/vite.config.ts +50 -0
  46. package/template-react/vitest.config.ts +18 -0
  47. package/template-react/vitest.setup.ts +13 -0
  48. package/{template-vue → template-shared}/.github/actions/setup-environment/action.yml +1 -1
  49. package/{template-vue → template-shared}/.github/workflows/ci.yml +1 -1
  50. package/{template-vue → template-shared}/.github/workflows/deploy.yml +1 -1
  51. package/{template-vue → template-shared}/.github/workflows/preview.yml +1 -1
  52. package/template-vue/README.md.art +1 -1
  53. package/template-vue/package.json +20 -20
  54. package/template-vue/src/styles/base.css +14 -3
  55. /package/{template-vue → template-shared}/.browserslistrc +0 -0
  56. /package/{template-vue → template-shared}/.github/renovate.json +0 -0
  57. /package/{template-vue → template-shared}/.gitlab/setup.yml +0 -0
  58. /package/{template-vue → template-shared}/.husky/commit-msg +0 -0
  59. /package/{template-vue → template-shared}/.husky/pre-commit +0 -0
  60. /package/{template-vue → template-shared}/LICENSE +0 -0
  61. /package/{template-vue → template-shared}/_gitignore +0 -0
  62. /package/{template-vue → template-shared}/_gitlab-ci.yml +0 -0
  63. /package/{template-vue → template-shared}/commitlint.config.js +0 -0
  64. /package/{template-vue → template-shared}/playwright.config.ts +0 -0
  65. /package/{template-vue → template-shared}/postcss.config.js +0 -0
  66. /package/{template-vue → template-shared}/prettier.config.js +0 -0
  67. /package/{template-vue → template-shared}/tsconfig.json +0 -0
  68. /package/{template-vue → template-shared}/tsconfig.node.json +0 -0
@@ -0,0 +1,13 @@
1
+ import { cleanup } from '@testing-library/react';
2
+ import { mswServer } from '@/mocks/server';
3
+ import '@testing-library/jest-dom';
4
+ import '@/plugins/i18n';
5
+
6
+ beforeAll(() => mswServer.listen());
7
+
8
+ afterEach(() => {
9
+ cleanup();
10
+ mswServer.resetHandlers();
11
+ });
12
+
13
+ afterAll(() => mswServer.close());
@@ -8,7 +8,7 @@ runs:
8
8
  - name: install Node.js
9
9
  uses: actions/setup-node@v4
10
10
  with:
11
- node-version: 20
11
+ node-version: 20.19.4
12
12
 
13
13
  - name: install pnpm
14
14
  uses: pnpm/action-setup@v4
@@ -8,7 +8,7 @@ jobs:
8
8
  CI:
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
- - uses: actions/checkout@v4
11
+ - uses: actions/checkout@v5
12
12
  - name: setup environment
13
13
  uses: './.github/actions/setup-environment'
14
14
 
@@ -16,7 +16,7 @@ jobs:
16
16
  runs-on: ubuntu-latest
17
17
  needs: CI
18
18
  steps:
19
- - uses: actions/checkout@v4
19
+ - uses: actions/checkout@v5
20
20
  # - name: setup environment
21
21
  # uses: './.github/actions/setup-environment'
22
22
 
@@ -12,6 +12,6 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  needs: CI
14
14
  steps:
15
- - uses: actions/checkout@v4
15
+ - uses: actions/checkout@v5
16
16
  # - name: setup environment
17
17
  # uses: './.github/actions/setup-environment'
@@ -8,7 +8,7 @@ This project is built with [vue3](https://vuejs.org/) + [vite](https://vite.dev/
8
8
  - **API & Mocking**: Handles requests with [axios](https://axios-http.com/docs/intro) and mocks APIs using [msw](https://mswjs.io/).
9
9
  - **Code Quality**: Enforces standards with [eslint](https://eslint.org/) and [prettier](https://prettier.io/), with [husky](https://www.npmjs.com/package/husky), [commitlint](https://commitlint.js.org/#/), and [lint-staged](https://github.com/okonet/lint-staged) for commit validation.
10
10
  - **Testing**: Uses [vitest](https://vitest.dev/) + [testing-library](https://testing-library.com/) for unit testing and [playwright](https://playwright.dev/) for E2E testing.
11
- - **Optimization**: Compresses CSS with [cssnano](https://cssnano.github.io/cssnano/) , converts units with [postcss-pxtorem](https://www.npmjs.com/package/postcss-pxtorem), and analyzes assets with [rollup-plugin-visualizer](https://github.com/btd/rollup-plugin-visualizer).
11
+ - **Optimization**: Compresses CSS with [cssnano](https://cssnano.github.io/cssnano/), converts units with [postcss-pxtorem](https://www.npmjs.com/package/postcss-pxtorem), convert modern CSS into something most browsers can understand with [postcss-preset-env](https://www.npmjs.com/package/postcss-preset-env), and analyzes assets with [rollup-plugin-visualizer](https://github.com/btd/rollup-plugin-visualizer).
12
12
  - **CI/CD**: Integrates `{{gitRepository}}` for automated testing and deployment.
13
13
 
14
14
  ## Code Features / Opinions
@@ -3,7 +3,7 @@
3
3
  "version": "0.0.0",
4
4
  "private": true,
5
5
  "type": "module",
6
- "packageManager": "pnpm@10.12.4",
6
+ "packageManager": "pnpm@10.15.0",
7
7
  "scripts": {
8
8
  "dev": "vite",
9
9
  "dev:mock": "MOCK=true vite",
@@ -18,42 +18,42 @@
18
18
  "preview": "vite preview"
19
19
  },
20
20
  "dependencies": {
21
- "axios": "^1.10.0",
21
+ "axios": "^1.11.0",
22
22
  "pinia": "^3.0.3",
23
- "pinia-plugin-persistedstate": "^4.3.0",
24
- "vue": "^3.5.17",
25
- "vue-i18n": "^11.1.7",
23
+ "pinia-plugin-persistedstate": "^4.5.0",
24
+ "vue": "^3.5.19",
25
+ "vue-i18n": "^11.1.11",
26
26
  "vue-router": "^4.5.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@component-hook/eslint-plugin": "1.1.1",
29
+ "@component-hook/eslint-plugin": "1.1.3",
30
30
  "@intlify/unplugin-vue-i18n": "^6.0.8",
31
- "@playwright/test": "^1.53.1",
32
- "@tailwindcss/vite": "^4.1.11",
33
- "@testing-library/jest-dom": "^6.6.3",
31
+ "@playwright/test": "^1.55.0",
32
+ "@tailwindcss/vite": "^4.1.12",
33
+ "@testing-library/jest-dom": "^6.8.0",
34
34
  "@testing-library/user-event": "^14.6.1",
35
35
  "@testing-library/vue": "^8.1.0",
36
36
  "@tsconfig/node22": "^22.0.2",
37
- "@types/node": "^22.15.33",
38
- "@vitejs/plugin-vue": "^5.2.4",
37
+ "@types/node": "^22.17.2",
38
+ "@vitejs/plugin-vue": "^6.0.1",
39
39
  "@vitest/coverage-v8": "^3.2.4",
40
- "@vue/tsconfig": "^0.7.0",
40
+ "@vue/tsconfig": "^0.8.1",
41
41
  "autoprefixer": "^10.4.21",
42
- "cssnano": "^7.0.7",
43
- "eslint": "^9.29.0",
42
+ "cssnano": "^7.1.0",
43
+ "eslint": "^9.33.0",
44
44
  "jsdom": "^26.1.0",
45
- "msw": "^2.10.2",
45
+ "msw": "^2.10.5",
46
46
  "postcss": "^8.5.6",
47
47
  "postcss-preset-env": "^10.2.4",
48
48
  "postcss-pxtorem": "^6.1.0",
49
49
  "prettier": "^3.6.2",
50
50
  "rollup-plugin-visualizer": "^6.0.3",
51
- "tailwindcss": "^4.1.11",
52
- "typescript": "^5.8.3",
53
- "vite": "^6.3.5",
51
+ "tailwindcss": "^4.1.12",
52
+ "typescript": "^5.9.2",
53
+ "vite": "^7.1.3",
54
54
  "vite-plugin-svg-icons": "^2.0.1",
55
55
  "vitest": "^3.2.4",
56
- "vue-tsc": "^2.2.10"
56
+ "vue-tsc": "^3.0.6"
57
57
  },
58
58
  "msw": {
59
59
  "workerDirectory": "public"
@@ -62,6 +62,6 @@
62
62
  "@commitlint/cli": "^19.8.1",
63
63
  "@commitlint/config-conventional": "^19.8.1",
64
64
  "husky": "^9.1.7",
65
- "lint-staged": "^16.1.2"
65
+ "lint-staged": "^16.1.5"
66
66
  }
67
67
  }
@@ -7,11 +7,16 @@
7
7
  color: rgba(255, 255, 255, 0.87);
8
8
  background-color: #242424;
9
9
 
10
- font-synthesis: none;
10
+ overscroll-behavior: none none;
11
+ touch-action: manipulation;
12
+ user-select: none;
11
13
  text-rendering: optimizeLegibility;
12
- -webkit-font-smoothing: antialiased;
13
14
  -moz-osx-font-smoothing: grayscale;
14
- -webkit-text-size-adjust: 100%;
15
+ -moz-touch-callout: none;
16
+ -ms-touch-callout: none;
17
+ -webkit-font-smoothing: antialiased;
18
+ -webkit-touch-callout: none;
19
+ -webkit-overflow-scrolling: touch;
15
20
  }
16
21
 
17
22
  @media (prefers-color-scheme: light) {
@@ -29,6 +34,12 @@ body {
29
34
  min-height: 100vh;
30
35
  }
31
36
 
37
+ img {
38
+ -webkit-touch-callout: none;
39
+ -webkit-user-drag: none;
40
+ user-select: none;
41
+ }
42
+
32
43
  #app {
33
44
  max-width: 80rem;
34
45
  margin: auto;
File without changes
File without changes
File without changes