├── .editorconfig
├── .env
├── .env.development
├── .env.production
├── .gitignore
├── .lintstagedrc.cjs
├── .npmrc
├── .stylelintcache
├── .stylelintignore
├── .stylelintrc
├── .vscode
├── extensions.json
└── settings.json
├── LICENSE
├── README.md
├── build
├── config
│ ├── index.ts
│ └── proxy.ts
├── plugins
│ ├── index.ts
│ ├── resolver.ts
│ └── unplugin.ts
└── utils.ts
├── commitlint.config.js
├── eslint.config.mjs
├── index.html
├── manifest.config.ts
├── netlify.toml
├── package.json
├── pages.config.ts
├── pnpm-lock.yaml
├── renovate.json
├── src
├── App.vue
├── api
│ └── index.ts
├── components
│ └── Counter.vue
├── composables
│ └── useToken.ts
├── constants
│ └── index.ts
├── layouts
│ └── default.vue
├── main.ts
├── manifest.json
├── pages.json
├── pages
│ ├── count
│ │ └── count.vue
│ └── index
│ │ └── index.vue
├── plugins
│ ├── dayjs.ts
│ ├── index.ts
│ └── vue-query.ts
├── service
│ ├── helper.ts
│ ├── index.ts
│ └── types.ts
├── static
│ ├── logo.png
│ ├── vite.svg
│ └── vue.svg
├── store
│ ├── index.ts
│ └── modules
│ │ ├── app
│ │ └── index.ts
│ │ ├── auth
│ │ └── index.ts
│ │ ├── count
│ │ └── index.ts
│ │ └── index.ts
├── styles
│ ├── reset.css
│ └── variables.scss
├── theme.json
├── uni.scss
└── utils
│ ├── is.ts
│ └── shared.ts
├── tsconfig.json
├── typings
├── common.d.ts
├── shime-uni.d.ts
└── vite-env.d.ts
├── uno.config.ts
└── vite.config.ts
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | VITE_APP_TITLE=''
2 | #服务启动端口
3 | VITE_PORT=5777
4 |
5 |
--------------------------------------------------------------------------------
/.env.development:
--------------------------------------------------------------------------------
1 | ENV = "development"
2 |
3 | VITE_ALOVA_TIPS=0
4 | # 资源公共路径,需要以 /开头和结尾
5 | VITE_PUBLIC_PATH = '/'
6 |
7 | # 是否hash路由模式
8 | VITE_USE_HASH = false
9 |
10 | # base api
11 | VITE_BASE_API = 'https://api.github.com'
12 |
13 |
14 |
15 |
16 | # 是否启用代理(只对本地vite server生效,开启MOCK时可关闭代理)
17 | VITE_USE_PROXY = false
18 |
19 | # 代理类型(跟启动和构建环境无关) 'dev' | 'test' | 'prod'
20 | VITE_PROXY_TYPE = 'test'
21 |
22 |
--------------------------------------------------------------------------------
/.env.production:
--------------------------------------------------------------------------------
1 | ENV = "production"
2 |
3 | # 资源公共路径,需要以 /开头和结尾
4 | VITE_PUBLIC_PATH = '/'
5 |
6 | # 是否hash路由模式
7 | VITE_USE_HASH = false
8 |
9 | # axios base api
10 | VITE_BASE_API = 'https://api.github.com/repos/yang1206'
11 |
12 |
13 |
14 |
15 | # 是否启用代理(只对本地vite server生效,开启MOCK时可关闭代理)
16 | VITE_USE_PROXY = false
17 |
18 | # 代理类型(跟启动和构建环境无关) 'dev' | 'test' | 'prod'
19 | VITE_PROXY_TYPE = 'test'
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | typings/auto-import.d.ts
11 | typings/uni-pages.d.ts
12 | typings/components.d.ts
13 |
14 |
15 | node_modules
16 | .DS_Store
17 | dist
18 | *.local
19 | coverage
20 | .eslintcache
21 | # Editor directories and files
22 | .idea
23 | *.suo
24 | *.ntvs*
25 | *.njsproj
26 | *.sln
27 | *.sw?
28 |
--------------------------------------------------------------------------------
/.lintstagedrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | '*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}': 'eslint --fix --cache',
3 | '*.{scss,css,vue}': 'stylelint --fix --allow-empty-input',
4 | '*.{ts,cts,mts,tsx,vue}': () => 'vue-tsc --noEmit -p tsconfig.json --composite false',
5 | }
6 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | # public-hoist-pattern[]=@vue*
2 | strict-peer-dependencies=false
3 | auto-install-peers=true
4 | shamefully-hoist=true
5 |
--------------------------------------------------------------------------------
/.stylelintcache:
--------------------------------------------------------------------------------
1 | [{"/Users/yangjunwei/codes/frontend/web/Project_Learn/mini-program/uniapp-vite/src/App.vue":"1","/Users/yangjunwei/codes/frontend/web/Project_Learn/mini-program/uniapp-vite/src/uni.scss":"2","/Users/yangjunwei/codes/frontend/web/Project_Learn/mini-program/uniapp-vite/src/styles/reset.css":"3","/Users/yangjunwei/codes/frontend/web/Project_Learn/mini-program/uniapp-vite/src/styles/variables.scss":"4","/Users/yangjunwei/codes/frontend/web/Project_Learn/mini-program/uniapp-vite/src/components/Counter.vue":"5","/Users/yangjunwei/codes/frontend/web/Project_Learn/mini-program/uniapp-vite/src/layouts/default.vue":"6","/Users/yangjunwei/codes/frontend/web/Project_Learn/mini-program/uniapp-vite/src/pages/count/count.vue":"7","/Users/yangjunwei/codes/frontend/web/Project_Learn/mini-program/uniapp-vite/src/pages/index/index.vue":"8"},{"size":1431,"mtime":1698888811952,"hashOfConfig":"9"},{"size":2251,"mtime":1700919780749,"hashOfConfig":"9"},{"size":127,"mtime":1700919780791,"hashOfConfig":"9"},{"size":1675,"mtime":1700919780791,"hashOfConfig":"9"},{"size":567,"mtime":1686929737039,"hashOfConfig":"9"},{"size":1335,"mtime":1694656381072,"hashOfConfig":"9"},{"size":372,"mtime":1700573207880,"hashOfConfig":"9"},{"size":1148,"mtime":1700919780807,"hashOfConfig":"9"},"45xzdr"]
--------------------------------------------------------------------------------
/.stylelintignore:
--------------------------------------------------------------------------------
1 | dist
2 | es
3 | lib
4 | css
5 | example
6 | public
7 | cache
8 | node_modules
9 | .husky
10 |
11 | docs/.vitepress/theme
12 |
13 | *.js
14 | *.cjs
15 | *.mjs
16 | *.ts
17 | *.tsx
18 | *.svg
19 | *.gif
20 | *.md
21 |
--------------------------------------------------------------------------------
/.stylelintrc:
--------------------------------------------------------------------------------
1 | {
2 | "defaultSeverity": "error",
3 | "extends": [
4 | "stylelint-config-standard",
5 | "stylelint-config-standard-scss",
6 | "stylelint-config-recommended-vue",
7 | "stylelint-config-html",
8 | "stylelint-config-recess-order"
9 | ],
10 | "plugins": [
11 | "stylelint-order"
12 | ],
13 | "rules": {
14 | "selector-class-pattern": [
15 | "^([#a-z][$#{}a-z0-9]*)((-{1,2}|_{2})[$#{}a-z0-9]+)*$",
16 | {
17 | "message": "Expected class selector to be kebab-case"
18 | }
19 | ],
20 | "selector-pseudo-class-no-unknown": [
21 | true,
22 | {
23 | "ignorePseudoClasses": [
24 | "::v-deep",
25 | "deep",
26 | "v-deep"
27 | ]
28 | }
29 | ],
30 | "selector-type-no-unknown": [
31 | true,
32 | {
33 | "ignoreTypes": [
34 | "page",
35 | "rich-text",
36 | "scroll-view"
37 | ]
38 | }
39 | ],
40 | "unit-no-unknown":[
41 | true,
42 | {
43 | "ignoreUnits": ["rpx","upx"]
44 | }
45 | ],
46 | "no-descending-specificity": null,
47 | "no-empty-source": null,
48 | "keyframes-name-pattern": "^[a-z]+([A-Z][a-z]*)*$"
49 | },
50 | "ignoreFiles": [
51 | "node_modules",
52 | "dist",
53 | "public",
54 | "output",
55 | "coverage",
56 | "temp",
57 | "*.js",
58 | "*.cjs",
59 | "*.mjs",
60 | "*.ts",
61 | "*.tsx",
62 | "*.svg",
63 | "*.gif",
64 | "*.md"
65 | ]
66 | }
67 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "dbaeumer.vscode-eslint",
4 | "uni-helper.uni-helper-vscode",
5 | "vue.volar",
6 | "antfu.unocss"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "explorer.fileNesting.patterns": {
3 | "vite.config.*": "pages.config.*, manifest.config.*, unocss.config.*, volar.config.*, *.env, .env.*"
4 | },
5 | "typescript.tsdk": "node_modules/typescript/lib",
6 | // "editor.defaultFormatter": "esbenp.prettier-vscode",
7 | "references.preferredLocation": "peek",
8 | // Auto fix
9 | "editor.codeActionsOnSave": {
10 | "source.fixAll.eslint": "explicit",
11 | "source.organizeImports": "never"
12 | },
13 | // Silent the stylistic rules in you IDE, but still auto fix them
14 | "eslint.rules.customizations": [
15 | {
16 | "rule": "style/*",
17 | "severity": "off"
18 | },
19 | {
20 | "rule": "*-indent",
21 | "severity": "off"
22 | },
23 | {
24 | "rule": "*-spacing",
25 | "severity": "off"
26 | },
27 | {
28 | "rule": "*-spaces",
29 | "severity": "off"
30 | },
31 | {
32 | "rule": "*-order",
33 | "severity": "off"
34 | },
35 | {
36 | "rule": "*-dangle",
37 | "severity": "off"
38 | },
39 | {
40 | "rule": "*-newline",
41 | "severity": "off"
42 | },
43 | {
44 | "rule": "*quotes",
45 | "severity": "off"
46 | },
47 | {
48 | "rule": "*semi",
49 | "severity": "off"
50 | }
51 | ],
52 | // Enable eslint for all supported languages
53 | "eslint.validate": [
54 | "javascript",
55 | "javascriptreact",
56 | "typescript",
57 | "typescriptreact",
58 | "vue",
59 | "html",
60 | "markdown",
61 | "json",
62 | "jsonc",
63 | "yaml"
64 | ],
65 | "vue.codeActions.enabled": false
66 | }
67 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 yang1206
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.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 🚀🚀🚀 一个Uniapp的起始模版,Vite,Vue3,TypeScript
2 |
3 |
4 |
5 |
6 | 预览 7 |
8 | 9 | Inspired by [Vitesse](https://github.com/antfu/vitesse) ❤ 10 | 11 | ### Features 12 | 13 | - ⚡️ [Vue3](https://vuejs.org/), [Vite 4](https://github.com/vitejs/vite), [pnpm](https://pnpm.io/), [ESBuild](https://github.com/evanw/esbuild) - 就是快! 14 | - 🗂 [基于文件的路由](https://github.com/uni-helper/vite-plugin-uni-pages) 15 | - 📦 [组件自动化加载](https://github.com/uni-helper/vite-plugin-uni-components) 16 | - 🎨 [UnoCSS](https://github.com/antfu/unocss) - 高性能且极具灵活性的即时原子化 CSS 引擎 17 | - 😃 [各种图标集为你所用](https://github.com/antfu/unocss/tree/main/packages/preset-icons) 18 | - 🔥 使用 [新的 ` 14 |