@huberyyang/create-todo-vue 1.0.1 → 1.1.0

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 (118) hide show
  1. package/README.md +11 -4
  2. package/dist/index.js +49 -63
  3. package/package.json +21 -24
  4. package/template-vitesse-base/.dockerignore +0 -2
  5. package/template-vitesse-base/.editorconfig +0 -9
  6. package/template-vitesse-base/.github/FUNDING.yml +0 -2
  7. package/template-vitesse-base/.github/workflows/ci.yml +0 -96
  8. package/template-vitesse-base/.vscode/extensions.json +0 -13
  9. package/template-vitesse-base/.vscode/settings.json +0 -48
  10. package/template-vitesse-base/Dockerfile +0 -18
  11. package/template-vitesse-base/LICENSE +0 -21
  12. package/template-vitesse-base/README.md +0 -216
  13. package/template-vitesse-base/README.zh-CN.md +0 -185
  14. package/template-vitesse-base/_gitignore +0 -11
  15. package/template-vitesse-base/cypress/e2e/basic.spec.ts +0 -36
  16. package/template-vitesse-base/cypress/tsconfig.json +0 -12
  17. package/template-vitesse-base/cypress.config.ts +0 -14
  18. package/template-vitesse-base/eslint.config.js +0 -10
  19. package/template-vitesse-base/index.html +0 -23
  20. package/template-vitesse-base/locales/README.md +0 -7
  21. package/template-vitesse-base/locales/ar.yml +0 -14
  22. package/template-vitesse-base/locales/de.yml +0 -14
  23. package/template-vitesse-base/locales/en.yml +0 -14
  24. package/template-vitesse-base/locales/es.yml +0 -14
  25. package/template-vitesse-base/locales/fr.yml +0 -14
  26. package/template-vitesse-base/locales/id.yml +0 -14
  27. package/template-vitesse-base/locales/it.yml +0 -13
  28. package/template-vitesse-base/locales/ja.yml +0 -13
  29. package/template-vitesse-base/locales/ka.yml +0 -14
  30. package/template-vitesse-base/locales/ko.yml +0 -13
  31. package/template-vitesse-base/locales/pl.yml +0 -14
  32. package/template-vitesse-base/locales/pt-BR.yml +0 -14
  33. package/template-vitesse-base/locales/ru.yml +0 -13
  34. package/template-vitesse-base/locales/tr.yml +0 -14
  35. package/template-vitesse-base/locales/uk.yml +0 -13
  36. package/template-vitesse-base/locales/uz.yml +0 -14
  37. package/template-vitesse-base/locales/vi.yml +0 -13
  38. package/template-vitesse-base/locales/zh-CN.yml +0 -14
  39. package/template-vitesse-base/netlify.toml +0 -17
  40. package/template-vitesse-base/package.json +0 -81
  41. package/template-vitesse-base/public/_headers +0 -3
  42. package/template-vitesse-base/public/favicon-dark.svg +0 -3
  43. package/template-vitesse-base/public/favicon.svg +0 -3
  44. package/template-vitesse-base/public/pwa-192x192.png +0 -0
  45. package/template-vitesse-base/public/pwa-512x512.png +0 -0
  46. package/template-vitesse-base/public/safari-pinned-tab.svg +0 -41
  47. package/template-vitesse-base/src/App.vue +0 -29
  48. package/template-vitesse-base/src/auto-imports.d.ts +0 -624
  49. package/template-vitesse-base/src/components/README.md +0 -9
  50. package/template-vitesse-base/src/components/TheCounter.vue +0 -19
  51. package/template-vitesse-base/src/components/TheFooter.vue +0 -37
  52. package/template-vitesse-base/src/components/TheInput.vue +0 -20
  53. package/template-vitesse-base/src/components.d.ts +0 -17
  54. package/template-vitesse-base/src/composables/dark.ts +0 -4
  55. package/template-vitesse-base/src/layouts/404.vue +0 -21
  56. package/template-vitesse-base/src/layouts/README.md +0 -14
  57. package/template-vitesse-base/src/layouts/default.vue +0 -12
  58. package/template-vitesse-base/src/layouts/home.vue +0 -12
  59. package/template-vitesse-base/src/main.ts +0 -25
  60. package/template-vitesse-base/src/modules/README.md +0 -11
  61. package/template-vitesse-base/src/modules/i18n.ts +0 -50
  62. package/template-vitesse-base/src/modules/nprogress.ts +0 -14
  63. package/template-vitesse-base/src/modules/pinia.ts +0 -17
  64. package/template-vitesse-base/src/modules/pwa.ts +0 -14
  65. package/template-vitesse-base/src/pages/README.md +0 -20
  66. package/template-vitesse-base/src/pages/[...all].vue +0 -14
  67. package/template-vitesse-base/src/pages/about.md +0 -26
  68. package/template-vitesse-base/src/pages/hi/[name].vue +0 -50
  69. package/template-vitesse-base/src/pages/index.vue +0 -59
  70. package/template-vitesse-base/src/shims.d.ts +0 -18
  71. package/template-vitesse-base/src/stores/user.ts +0 -34
  72. package/template-vitesse-base/src/styles/main.css +0 -29
  73. package/template-vitesse-base/src/styles/markdown.css +0 -25
  74. package/template-vitesse-base/src/typed-router.d.ts +0 -27
  75. package/template-vitesse-base/src/types.ts +0 -3
  76. package/template-vitesse-base/test/__snapshots__/component.test.ts.snap +0 -3
  77. package/template-vitesse-base/test/basic.test.ts +0 -7
  78. package/template-vitesse-base/test/component.test.ts +0 -28
  79. package/template-vitesse-base/tsconfig.json +0 -38
  80. package/template-vitesse-base/uno.config.ts +0 -41
  81. package/template-vitesse-base/vite.config.ts +0 -167
  82. package/template-vitesse-lite/.editorconfig +0 -9
  83. package/template-vitesse-lite/.github/FUNDING.yml +0 -2
  84. package/template-vitesse-lite/.github/workflows/test.yml +0 -47
  85. package/template-vitesse-lite/.vscode/extensions.json +0 -11
  86. package/template-vitesse-lite/.vscode/settings.json +0 -48
  87. package/template-vitesse-lite/LICENSE +0 -21
  88. package/template-vitesse-lite/README.md +0 -86
  89. package/template-vitesse-lite/README.zh-CN.md +0 -87
  90. package/template-vitesse-lite/_gitignore +0 -9
  91. package/template-vitesse-lite/auto-imports.d.ts +0 -603
  92. package/template-vitesse-lite/components.d.ts +0 -17
  93. package/template-vitesse-lite/eslint.config.js +0 -9
  94. package/template-vitesse-lite/index.html +0 -25
  95. package/template-vitesse-lite/netlify.toml +0 -11
  96. package/template-vitesse-lite/package.json +0 -53
  97. package/template-vitesse-lite/public/favicon.svg +0 -9
  98. package/template-vitesse-lite/shims.d.ts +0 -6
  99. package/template-vitesse-lite/src/App.vue +0 -6
  100. package/template-vitesse-lite/src/components/README.md +0 -9
  101. package/template-vitesse-lite/src/components/TheCounter.vue +0 -19
  102. package/template-vitesse-lite/src/components/TheFooter.vue +0 -15
  103. package/template-vitesse-lite/src/components/TheInput.vue +0 -18
  104. package/template-vitesse-lite/src/composables/dark.ts +0 -2
  105. package/template-vitesse-lite/src/composables/index.ts +0 -1
  106. package/template-vitesse-lite/src/main.ts +0 -15
  107. package/template-vitesse-lite/src/pages/README.md +0 -20
  108. package/template-vitesse-lite/src/pages/[...all].vue +0 -5
  109. package/template-vitesse-lite/src/pages/hi/[name].vue +0 -22
  110. package/template-vitesse-lite/src/pages/index.vue +0 -46
  111. package/template-vitesse-lite/src/styles/main.css +0 -11
  112. package/template-vitesse-lite/test/__snapshots__/component.test.ts.snap +0 -3
  113. package/template-vitesse-lite/test/basic.test.ts +0 -7
  114. package/template-vitesse-lite/test/component.test.ts +0 -22
  115. package/template-vitesse-lite/tsconfig.json +0 -32
  116. package/template-vitesse-lite/typed-router.d.ts +0 -25
  117. package/template-vitesse-lite/uno.config.ts +0 -29
  118. package/template-vitesse-lite/vite.config.ts +0 -68
@@ -1,48 +0,0 @@
1
- {
2
- "cSpell.words": ["Vitesse", "Vite", "unocss", "vitest", "vueuse", "pinia", "demi", "antfu", "iconify", "intlify", "vitejs", "unplugin", "pnpm"],
3
- "i18n-ally.sourceLanguage": "en",
4
- "i18n-ally.keystyle": "nested",
5
- "i18n-ally.localesPaths": "locales",
6
- "i18n-ally.sortKeys": true,
7
-
8
- // Disable the default formatter
9
- "prettier.enable": false,
10
- "editor.formatOnSave": false,
11
-
12
- // Auto fix
13
- "editor.codeActionsOnSave": {
14
- "source.fixAll.eslint": "explicit",
15
- "source.organizeImports": "never"
16
- },
17
-
18
- // Silent the stylistic rules in you IDE, but still auto fix them
19
- "eslint.rules.customizations": [
20
- { "rule": "style/*", "severity": "off" },
21
- { "rule": "format/*", "severity": "off" },
22
- { "rule": "*-indent", "severity": "off" },
23
- { "rule": "*-spacing", "severity": "off" },
24
- { "rule": "*-spaces", "severity": "off" },
25
- { "rule": "*-order", "severity": "off" },
26
- { "rule": "*-dangle", "severity": "off" },
27
- { "rule": "*-newline", "severity": "off" },
28
- { "rule": "*quotes", "severity": "off" },
29
- { "rule": "*semi", "severity": "off" }
30
- ],
31
-
32
- // The following is optional.
33
- // It's better to put under project setting `.vscode/settings.json`
34
- // to avoid conflicts with working with different eslint configs
35
- // that does not support all formats.
36
- "eslint.validate": [
37
- "javascript",
38
- "javascriptreact",
39
- "typescript",
40
- "typescriptreact",
41
- "vue",
42
- "html",
43
- "markdown",
44
- "json",
45
- "jsonc",
46
- "yaml"
47
- ]
48
- }
@@ -1,18 +0,0 @@
1
- FROM node:20-alpine AS build-stage
2
-
3
- WORKDIR /app
4
- RUN corepack enable
5
-
6
- COPY .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml ./
7
- RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
8
- pnpm install --frozen-lockfile
9
-
10
- COPY . .
11
- RUN pnpm build
12
-
13
- FROM nginx:stable-alpine AS production-stage
14
-
15
- COPY --from=build-stage /app/dist /usr/share/nginx/html
16
- EXPOSE 80
17
-
18
- CMD ["nginx", "-g", "daemon off;"]
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2020-PRESENT Anthony Fu
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,216 +0,0 @@
1
- <p align='center'>
2
- <img src='https://user-images.githubusercontent.com/11247099/154486817-f86b8f20-5463-4122-b6e9-930622e757f2.png' alt='Vitesse - Opinionated Vite Starter Template' width='600'/>
3
- </p>
4
-
5
- <p align='center'>
6
- Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
7
- </p>
8
-
9
- <br>
10
-
11
- <p align='center'>
12
- <a href="https://vitesse.netlify.app/">Live Demo</a>
13
- </p>
14
-
15
- <br>
16
-
17
- > **Note**: This template is created during the early transition of Vue 3 and Vite. At this moment, if you are seeking for better Vue developer experience and more consistent maintenance, we recommend using [Nuxt](https://nuxt.com) instead (it also works perfectly with SPA or SSG as needed). This template still serves as a reference, but expect slower updates.
18
-
19
- <br>
20
-
21
- <p align='center'>
22
- <b>English</b> | <a href="https://github.com/antfu-collective/vitesse/blob/main/README.zh-CN.md">简体中文</a>
23
- <!-- Contributors: Thanks for getting interested, however we DON'T accept new translations to the README, thanks. -->
24
- </p>
25
-
26
- <br>
27
-
28
- ## Features
29
-
30
- - ⚡️ [Vue 3](https://github.com/vuejs/core), [Vite](https://github.com/vitejs/vite), [pnpm](https://pnpm.io/), [esbuild](https://github.com/evanw/esbuild) - born with fastness
31
-
32
- - 🗂 [File based routing](./src/pages)
33
-
34
- - 📦 [Components auto importing](./src/components)
35
-
36
- - 🍍 [State Management via Pinia](https://pinia.vuejs.org/)
37
-
38
- - 📑 [Layout system](./src/layouts)
39
-
40
- - 📲 [PWA](https://github.com/antfu/vite-plugin-pwa)
41
-
42
- - 🎨 [UnoCSS](https://github.com/antfu/unocss) - the instant on-demand atomic CSS engine
43
-
44
- - 😃 [Use icons from any icon sets with classes](https://github.com/antfu/unocss/tree/main/packages/preset-icons)
45
-
46
- - 🌍 [I18n ready](./locales)
47
-
48
- - 🔎 [Component Preview](https://github.com/johnsoncodehk/vite-plugin-vue-component-preview)
49
-
50
- - 🗒 [Markdown Support](https://github.com/unplugin/unplugin-vue-markdown)
51
-
52
- - 🔥 Use the [new `<script setup>` syntax](https://github.com/vuejs/rfcs/pull/227)
53
-
54
- - 📥 [APIs auto importing](https://github.com/antfu/unplugin-auto-import) - use Composition API and others directly
55
-
56
- - 🖨 Static-site generation (SSG) via [vite-ssg](https://github.com/antfu/vite-ssg)
57
-
58
- - 🦔 Critical CSS via [beasties](https://github.com/danielroe/beasties)
59
-
60
- - 🦾 TypeScript, of course
61
-
62
- - ⚙️ Unit Testing with [Vitest](https://github.com/vitest-dev/vitest), E2E Testing with [Cypress](https://cypress.io/) on [GitHub Actions](https://github.com/features/actions)
63
-
64
- - ☁️ Deploy on Netlify, zero-config
65
-
66
- <br>
67
-
68
- ## Pre-packed
69
-
70
- ### UI Frameworks
71
-
72
- - [UnoCSS](https://github.com/antfu/unocss) - The instant on-demand atomic CSS engine.
73
-
74
- ### Icons
75
-
76
- - [Iconify](https://iconify.design) - use icons from any icon sets [🔍Icônes](https://icones.netlify.app/)
77
- - [Pure CSS Icons via UnoCSS](https://github.com/antfu/unocss/tree/main/packages/preset-icons)
78
-
79
- ### Plugins
80
-
81
- - [Vue Router](https://github.com/vuejs/router)
82
- - [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) - file system based routing
83
- - [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts) - layouts for pages
84
- - [Pinia](https://pinia.vuejs.org) - Intuitive, type safe, light and flexible Store for Vue using the composition api
85
- - [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) - components auto import
86
- - [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) - Directly use Vue Composition API and others without importing
87
- - [`unplugin-vue-macros`](https://github.com/sxzz/unplugin-vue-macros) - Explore and extend more macros and syntax sugar to Vue.
88
- - [`vite-plugin-pwa`](https://github.com/antfu/vite-plugin-pwa) - PWA
89
- - [`unplugin-vue-markdown`](https://github.com/unplugin/unplugin-vue-markdown) - Markdown as components / components in Markdown
90
- - [`@shikijs/markdown-it`](https://github.com/shikijs/shiki) - [Shiki](https://github.com/shikijs/shiki) for syntax highlighting
91
- - [Vue I18n](https://github.com/intlify/vue-i18n-next) - Internationalization
92
- - [`unplugin-vue-i18n`](https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n) - unplugin for Vue I18n
93
- - [VueUse](https://github.com/antfu/vueuse) - collection of useful composition APIs
94
- - [`vite-ssg-sitemap`](https://github.com/jbaubree/vite-ssg-sitemap) - Sitemap generator
95
- - [`@unhead/vue v2`](https://github.com/unjs/unhead) - manipulate document head reactively
96
- - [`vite-plugin-vue-devtools`](https://github.com/vuejs/devtools-next) - Designed to enhance the Vue developer experience.
97
-
98
- ### Coding Style
99
-
100
- - Use Composition API with [`<script setup>` SFC syntax](https://github.com/vuejs/rfcs/pull/227)
101
- - [ESLint](https://eslint.org/) with [@antfu/eslint-config](https://github.com/antfu/eslint-config), single quotes, no semi.
102
-
103
- ### Dev tools
104
-
105
- - [TypeScript](https://www.typescriptlang.org/)
106
- - [Vitest](https://github.com/vitest-dev/vitest) - Unit testing powered by Vite
107
- - [Cypress](https://cypress.io/) - E2E testing
108
- - [pnpm](https://pnpm.js.org/) - fast, disk space efficient package manager
109
- - [`vite-ssg`](https://github.com/antfu/vite-ssg) - Static-site generation
110
- - [beasties](https://github.com/danielroe/beasties) - Critical CSS
111
- - [Netlify](https://www.netlify.com/) - zero-config deployment
112
- - [VS Code Extensions](./.vscode/extensions.json)
113
- - [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) - Fire up Vite server automatically
114
- - [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) - Vue 3 `<script setup>` IDE support
115
- - [Iconify IntelliSense](https://marketplace.visualstudio.com/items?itemName=antfu.iconify) - Icon inline display and autocomplete
116
- - [i18n Ally](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally) - All in one i18n support
117
- - [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
118
-
119
- ## Variations
120
-
121
- As this template is strongly opinionated, the following provides a curated list for community-maintained variations with different preferences and feature sets. Check them out as well. PR to add yours is also welcome!
122
-
123
- ###### Official
124
-
125
- - [vitesse-lite](https://github.com/antfu/vitesse-lite) - Lightweight version of Vitesse
126
- - [vitesse-nuxt3](https://github.com/antfu/vitesse-nuxt3) - Vitesse for Nuxt 3
127
- - [vitesse-nuxt-bridge](https://github.com/antfu/vitesse-nuxt-bridge) - Vitesse for Nuxt 2 with Bridge
128
- - [vitesse-webext](https://github.com/antfu/vitesse-webext) - WebExtension Vite starter template
129
-
130
- ###### Community
131
-
132
- - [vitesse-ssr-template](https://github.com/frandiox/vitesse-ssr-template) by [@frandiox](https://github.com/frandiox) - Vitesse with SSR
133
- - [vitailse](https://github.com/zynth17/vitailse) by [@zynth17](https://github.com/zynth17) - Like Vitesse but with TailwindCSS
134
- - [vitesse-modernized-chrome-ext](https://github.com/xiaoluoboding/vitesse-modernized-chrome-ext) by [@xiaoluoboding](https://github.com/xiaoluoboding) - ⚡️ Modernized Chrome Extension Manifest V3 Vite Starter Template
135
- - [vitesse-stackter-clean-architect](https://github.com/shamscorner/vitesse-stackter-clean-architect) by [@shamscorner](https://github.com/shamscorner) - A modular clean architecture pattern in vitesse template
136
- - [vitesse-enterprise](https://github.com/FranciscoKloganB/vitesse-enterprise) by [@FranciscoKloganB](https://github.com/FranciscoKloganB) - Consistent coding styles regardless of team-size.
137
- - [vitecamp](https://github.com/nekobc1998923/vitecamp) by [@nekobc1998923](https://github.com/nekobc1998923) - Like Vitesse but without SSG/SSR/File based routing, includes Element Plus
138
- - [vitesse-h5](https://github.com/YunYouJun/vitesse-h5) by [@YunYouJun](https://github.com/YunYouJun) - Vitesse for Mobile
139
- - [bat](https://github.com/olgam4/bat) by [@olgam4](https://github.com/olgam4) - Vitesse for SolidJS
140
- - [vitesse-solid](https://github.com/xbmlz/vitesse-solid) by [@xbmlz](https://github.com/xbmlz) - Vitesse for SolidJS, build with [`SolidStart`](https://start.solidjs.com/), includes [UnoCSS](https://github.com/unocss/unocss).
141
- - [vue3-vant-mobile](https://github.com/easy-temps/vue3-vant-mobile) by [CharleeWa](https://github.com/CharleeWa) - Like Vitesse but without SSG/SSR, includes Vant
142
-
143
- ## Try it now!
144
-
145
- > Vitesse requires Node >=14.18
146
-
147
- ### GitHub Template
148
-
149
- [Create a repo from this template on GitHub](https://github.com/antfu-collective/vitesse/generate).
150
-
151
- ### Clone to local
152
-
153
- If you prefer to do it manually with the cleaner git history
154
-
155
- ```bash
156
- npx degit antfu-collective/vitesse my-vitesse-app
157
- cd my-vitesse-app
158
- pnpm i # If you don't have pnpm installed, run: npm install -g pnpm
159
- ```
160
-
161
- ## Checklist
162
-
163
- When you use this template, try follow the checklist to update your info properly
164
-
165
- - [ ] Change the author name in `LICENSE`
166
- - [ ] Change the title in `App.vue`
167
- - [ ] Change the hostname in `vite.config.ts`
168
- - [ ] Change the favicon in `public`
169
- - [ ] Remove the `.github` folder which contains the funding info
170
- - [ ] Clean up the READMEs and remove routes
171
-
172
- And, enjoy :)
173
-
174
- ## Usage
175
-
176
- ### Development
177
-
178
- Just run and visit http://localhost:3333
179
-
180
- ```bash
181
- pnpm dev
182
- ```
183
-
184
- ### Build
185
-
186
- To build the App, run
187
-
188
- ```bash
189
- pnpm build
190
- ```
191
-
192
- And you will see the generated file in `dist` that ready to be served.
193
-
194
- ### Deploy on Netlify
195
-
196
- Go to [Netlify](https://app.netlify.com/start) and select your clone, `OK` along the way, and your App will be live in a minute.
197
-
198
- ### Docker Production Build
199
-
200
- First, build the vitesse image by opening the terminal in the project's root directory.
201
-
202
- ```bash
203
- docker buildx build . -t vitesse:latest
204
- ```
205
-
206
- Run the image and specify port mapping with the `-p` flag.
207
-
208
- ```bash
209
- docker run --rm -it -p 8080:80 vitesse:latest
210
- ```
211
-
212
- ## Why
213
-
214
- I have created several Vite apps recently. Setting the configs up is kinda the bottleneck for me to make the ideas simply come true within a very short time.
215
-
216
- So I made this starter template for myself to create apps more easily, along with some good practices that I have learned from making those apps. It's strongly opinionated, but feel free to tweak it or even maintain your own forks. [(see community maintained variation forks)](#variations)
@@ -1,185 +0,0 @@
1
- <p align='center'>
2
- <img src='https://user-images.githubusercontent.com/11247099/154486817-f86b8f20-5463-4122-b6e9-930622e757f2.png' alt='Vitesse - Opinionated Vite Starter Template' width='600'/>
3
- </p>
4
-
5
- <p align='center'>
6
- 快速地<sup><em>Vitesse</em></sup> 创建 Web 应用
7
- <br>
8
- </p>
9
-
10
- <br>
11
-
12
- <p align='center'>
13
- <a href="https://vitesse.netlify.app/">在线 Demo</a>
14
- </p>
15
-
16
- <br>
17
-
18
- > **Note**: 本模板创建于 Vue 3 和 Vite 的早期过渡时期。目前,如果您正在寻求更好的 Vue 开发体验和更持续的维护,我们建议您使用 [Nuxt 3](https://nuxt.com) 来代替(它也可以根据需要使用 SPA 或 SSG)。本模板仍会作为参考缓慢地维护下去,但将不会有太多的更新。
19
-
20
- <br>
21
-
22
- <p align='center'>
23
- <a href="https://github.com/antfu-collective/vitesse/blob/main/README.md">English</a> | <b>简体中文</b>
24
- </p>
25
-
26
- <br>
27
-
28
- ## 特性
29
-
30
- - ⚡️ [Vue 3](https://github.com/vuejs/core), [Vite](https://github.com/vitejs/vite), [pnpm](https://pnpm.io/), [esbuild](https://github.com/evanw/esbuild) - 就是快!
31
-
32
- - 🗂 [基于文件的路由](./src/pages)
33
-
34
- - 📦 [组件自动化加载](./src/components)
35
-
36
- - 🍍 [使用 Pinia 的状态管理](https://pinia.vuejs.org)
37
-
38
- - 📑 [布局系统](./src/layouts)
39
-
40
- - 📲 [PWA](https://github.com/antfu/vite-plugin-pwa)
41
-
42
- - 🎨 [UnoCSS](https://github.com/unocss/unocss) - 高性能且极具灵活性的即时原子化 CSS 引擎
43
-
44
- - 😃 [各种图标集为你所用](https://github.com/antfu/unocss/tree/main/packages/preset-icons)
45
-
46
- - 🌍 [I18n 国际化开箱即用](./locales)
47
-
48
- - 🗒 [Markdown 支持](https://github.com/unplugin/unplugin-vue-markdown)
49
-
50
- - 🔥 使用 [新的 `<script setup>` 语法](https://github.com/vuejs/rfcs/pull/227)
51
-
52
- - 📥 [API 自动加载](https://github.com/unplugin/unplugin-auto-import) - 直接使用 Composition API 无需引入
53
-
54
- - 🖨 使用 [vite-ssg](https://github.com/antfu/vite-ssg) 进行服务端生成 (SSG)
55
-
56
- - 🦔 使用 [beasties](https://github.com/danielroe/beasties) 的生成关键 CSS
57
-
58
- - 🦾 TypeScript, 当然
59
-
60
- - ⚙️ 结合 [GitHub Actions](https://github.com/features/actions),使用 [Vitest](https://github.com/vitest-dev/vitest) 进行单元测试, [Cypress](https://cypress.io/) 进行 E2E 测试
61
-
62
- - ☁️ 零配置部署 Netlify
63
-
64
- <br>
65
-
66
- ## 预配置
67
-
68
- ### UI 框架
69
-
70
- - [UnoCSS](https://github.com/antfu/unocss) - 高性能且极具灵活性的即时原子化 CSS 引擎
71
-
72
- ### Icons
73
-
74
- - [Iconify](https://iconify.design) - 使用任意的图标集,浏览:[🔍Icônes](https://icones.netlify.app/)
75
- - [UnoCSS 的纯 CSS 图标方案](https://github.com/antfu/unocss/tree/main/packages/preset-icons)
76
-
77
- ### 插件
78
-
79
- - [Vue Router](https://github.com/vuejs/router)
80
- - [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) - 以文件系统为基础的路由
81
- - [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts) - 页面布局系统
82
- - [Pinia](https://pinia.vuejs.org) - 直接的, 类型安全的, 使用 Composition API 的轻便灵活的 Vue 状态管理
83
- - [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) - 自动加载组件
84
- - [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) - 直接使用 Composition API 等,无需导入
85
- - [`vite-plugin-pwa`](https://github.com/antfu/vite-plugin-pwa) - PWA
86
- - [`unplugin-vue-markdown`](https://github.com/unplugin/unplugin-vue-markdown) - Markdown 作为组件,也可以让组件在 Markdown 中使用
87
- - [`markdown-it-prism`](https://github.com/jGleitz/markdown-it-prism) - [Prism](https://prismjs.com/) 的语法高亮
88
- - [`prism-theme-vars`](https://github.com/antfu/prism-theme-vars) - 利用 CSS 变量自定义 Prism.js 的主题
89
- - [Vue I18n](https://github.com/intlify/vue-i18n-next) - 国际化
90
- - [`unplugin-vue-i18n`](https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n) - Vue I18n 的 Vite 插件
91
- - [VueUse](https://github.com/antfu/vueuse) - 实用的 Composition API 工具合集
92
- - [`vite-ssg-sitemap`](https://github.com/jbaubree/vite-ssg-sitemap) - 站点地图生成器
93
- - [`@vueuse/head`](https://github.com/vueuse/head) - 响应式地操作文档头信息
94
- - [`vite-plugin-vue-devtools`](https://github.com/webfansplz/vite-plugin-vue-devtools) - 旨在增强Vue开发者体验的Vite插件
95
-
96
- ### 编码风格
97
-
98
- - 使用 Composition API 地 [`<script setup>` SFC 语法](https://github.com/vuejs/rfcs/pull/227)
99
- - [ESLint](https://eslint.org/) 配置为 [@antfu/eslint-config](https://github.com/antfu/eslint-config), 单引号, 无分号.
100
-
101
- ### 开发工具
102
-
103
- - [TypeScript](https://www.typescriptlang.org/)
104
- - [Vitest](https://github.com/vitest-dev/vitest) - 基于 Vite 的单元测试框架
105
- - [Cypress](https://cypress.io/) - E2E 测试
106
- - [pnpm](https://pnpm.js.org/) - 快, 节省磁盘空间的包管理器
107
- - [`vite-ssg`](https://github.com/antfu/vite-ssg) - 服务端生成
108
- - [beasties](https://github.com/danielroe/beasties) - 关键 CSS 生成器
109
- - [Netlify](https://www.netlify.com/) - 零配置的部署
110
- - [VS Code 扩展](./.vscode/extensions.json)
111
- - [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) - 自动启动 Vite 服务器
112
- - [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) - Vue 3 `<script setup>` IDE 支持
113
- - [Iconify IntelliSense](https://marketplace.visualstudio.com/items?itemName=antfu.iconify) - 图标内联显示和自动补全
114
- - [i18n Ally](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally) - 多合一的 I18n 支持
115
- - [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
116
-
117
- ## 衍生项目
118
-
119
- 由于这个模板的业务场景非常的局限,下面提供了一个精心策划的列表,列出了社区维护的具有不同偏好和功能集的衍生项目。也可以看看他们。当然也欢迎你 PR 提供自己的项目!
120
-
121
- ###### 官方
122
-
123
- - [vitesse-lite](https://github.com/antfu/vitesse-lite) - Vitesse 的轻量版本
124
- - [vitesse-nuxt3](https://github.com/antfu/vitesse-nuxt3) - Vitesse 的 Nuxt 3 版本
125
- - [vitesse-nuxt-bridge](https://github.com/antfu/vitesse-nuxt-bridge) - Vitesse 的 Nuxt2 桥接版本
126
- - [vitesse-webext](https://github.com/antfu/vitesse-webext) - 开箱即用的浏览器扩展 vite 模板
127
-
128
- ###### 社区
129
-
130
- [查看英文版](./README.md#community)
131
-
132
- ## 现在可以试试!
133
-
134
- > Vitesse 需要 Node 版本 >=14.18
135
-
136
- ### GitHub 模板
137
-
138
- [使用这个模板创建仓库](https://github.com/antfu-collective/vitesse/generate).
139
-
140
- ### 克隆到本地
141
-
142
- 如果您更喜欢使用更干净的 git 历史记录手动执行此操作
143
-
144
- ```bash
145
- npx degit antfu-collective/vitesse my-vitesse-app
146
- cd my-vitesse-app
147
- pnpm i # 如果你没装过 pnpm, 可以先运行: npm install -g pnpm
148
- ```
149
-
150
- ## 清单
151
-
152
- 使用此模板时,请尝试按照清单正确更新您自己的信息
153
-
154
- - [ ] 在 `LICENSE` 中改变作者名
155
- - [ ] 在 `App.vue` 中改变标题
156
- - [ ] 在 `vite.config.ts` 更改主机名
157
- - [ ] 在 `public` 目录下改变favicon
158
- - [ ] 移除 `.github` 文件夹中包含资助的信息
159
- - [ ] 整理 README 并删除路由
160
-
161
- 紧接着, 享受吧 :)
162
-
163
- ## 使用
164
-
165
- ### 开发
166
-
167
- 只需要执行以下命令就可以在 http://localhost:3333 中看到
168
-
169
- ```bash
170
- pnpm dev
171
- ```
172
-
173
- ### 构建
174
-
175
- 构建该应用只需要执行以下命令
176
-
177
- ```bash
178
- pnpm build
179
- ```
180
-
181
- 然后你会看到用于发布的 `dist` 文件夹被生成。
182
-
183
- ### 部署到 Netlify
184
-
185
- 前往 [Netlify](https://app.netlify.com/start) 并选择你的仓库, 一路 `OK` 下去,稍等一下后,你的应用将被创建.
@@ -1,11 +0,0 @@
1
- .DS_Store
2
- .vite-ssg-dist
3
- .vite-ssg-temp
4
- *.local
5
- dist
6
- dist-ssr
7
- node_modules
8
- .idea/
9
- *.log
10
- cypress/downloads
11
- public/assets/fonts
@@ -1,36 +0,0 @@
1
- context('Basic', () => {
2
- beforeEach(() => {
3
- cy.visit('/')
4
- })
5
-
6
- it('basic nav', () => {
7
- cy.url()
8
- .should('eq', 'http://localhost:3333/')
9
-
10
- cy.contains('[Home Layout]')
11
- .should('exist')
12
-
13
- cy.get('#input')
14
- .type('Vitesse{Enter}')
15
- .url()
16
- .should('eq', 'http://localhost:3333/hi/Vitesse')
17
-
18
- cy.contains('[Default Layout]')
19
- .should('exist')
20
-
21
- cy.get('[btn]')
22
- .click()
23
- .url()
24
- .should('eq', 'http://localhost:3333/')
25
- })
26
-
27
- it('markdown', () => {
28
- cy.get('[data-test-id="about"]')
29
- .click()
30
- .url()
31
- .should('eq', 'http://localhost:3333/about')
32
-
33
- cy.get('.shiki')
34
- .should('exist')
35
- })
36
- })
@@ -1,12 +0,0 @@
1
- {
2
- "extends": "../tsconfig.json",
3
- "compilerOptions": {
4
- "types": [
5
- "cypress"
6
- ]
7
- },
8
- "include": [
9
- "**/*.ts"
10
- ],
11
- "exclude": []
12
- }
@@ -1,14 +0,0 @@
1
- import { defineConfig } from 'cypress'
2
- import vitePreprocessor from 'cypress-vite'
3
-
4
- export default defineConfig({
5
- e2e: {
6
- baseUrl: 'http://localhost:3333',
7
- chromeWebSecurity: false,
8
- specPattern: 'cypress/e2e/**/*.spec.*',
9
- supportFile: false,
10
- setupNodeEvents(on) {
11
- on('file:preprocessor', vitePreprocessor())
12
- },
13
- },
14
- })
@@ -1,10 +0,0 @@
1
- // @ts-check
2
- import antfu from '@antfu/eslint-config'
3
-
4
- export default antfu(
5
- {
6
- unocss: true,
7
- formatters: true,
8
- pnpm: true,
9
- },
10
- )
@@ -1,23 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <link rel="apple-touch-icon" href="/pwa-192x192.png" />
7
- <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#00aba9" />
8
- <meta name="msapplication-TileColor" content="#00aba9" />
9
- <script>
10
- ;(function () {
11
- const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
12
- const setting = localStorage.getItem('vueuse-color-scheme') || 'auto'
13
- if (setting === 'dark' || (prefersDark && setting !== 'light'))
14
- document.documentElement.classList.toggle('dark', true)
15
- })()
16
- </script>
17
- </head>
18
- <body class="font-sans">
19
- <div id="app"></div>
20
- <script type="module" src="/src/main.ts"></script>
21
- <noscript> This website requires JavaScript to function properly. Please enable JavaScript to continue. </noscript>
22
- </body>
23
- </html>
@@ -1,7 +0,0 @@
1
- ## i18n
2
-
3
- This directory is to serve your locale translation files. YAML under this folder would be loaded automatically and register with their filenames as locale code.
4
-
5
- Check out [`vue-i18n`](https://github.com/intlify/vue-i18n-next) for more details.
6
-
7
- If you are using VS Code, [`i18n Ally`](https://github.com/lokalise/i18n-ally) is recommended to make the i18n experience better.
@@ -1,14 +0,0 @@
1
- button:
2
- about: حول
3
- back: رجوع
4
- go: تجربة
5
- home: الرئيسية
6
- toggle_dark: التغيير إلى الوضع المظلم
7
- toggle_langs: تغيير اللغة
8
- intro:
9
- desc: vite مثال لتطبيق
10
- dynamic-route: عرض لتوجيهات ديناميكية
11
- hi: مرحبا {name}
12
- aka: معروف أيضا تحت مسمى
13
- whats-your-name: ما إسمك؟
14
- not-found: صفحة غير موجودة
@@ -1,14 +0,0 @@
1
- button:
2
- about: Über
3
- back: Zurück
4
- go: Los
5
- home: Startseite
6
- toggle_dark: Dunkelmodus umschalten
7
- toggle_langs: Sprachen ändern
8
- intro:
9
- desc: Vite Startvorlage mit Vorlieben
10
- dynamic-route: Demo einer dynamischen Route
11
- hi: Hi, {name}!
12
- aka: Auch bekannt als
13
- whats-your-name: Wie heißt du?
14
- not-found: Nicht gefunden
@@ -1,14 +0,0 @@
1
- button:
2
- about: About
3
- back: Back
4
- go: GO
5
- home: Home
6
- toggle_dark: Toggle dark mode
7
- toggle_langs: Change languages
8
- intro:
9
- desc: Opinionated Vite Starter Template
10
- dynamic-route: Demo of dynamic route
11
- hi: Hi, {name}!
12
- aka: Also known as
13
- whats-your-name: What's your name?
14
- not-found: Not found