-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fa3cf69
Showing
104 changed files
with
15,452 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 应用配置面板 | ||
VITE_APP_SETTING = true | ||
# 页面标题 | ||
VITE_APP_TITLE = Fantastic-mobile 基础版 | ||
# 接口请求地址,会设置到 axios 的 baseURL 参数上 | ||
VITE_APP_API_BASEURL = / | ||
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 | ||
VITE_APP_DEBUG_TOOL = | ||
|
||
# 是否开启代理 | ||
VITE_OPEN_PROXY = true | ||
# 是否开启开发者工具 | ||
VITE_OPEN_DEVTOOLS = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 应用配置面板 | ||
VITE_APP_SETTING = true | ||
# 页面标题 | ||
VITE_APP_TITLE = Fantastic-mobile 基础版 | ||
# 接口请求地址,会设置到 axios 的 baseURL 参数上 | ||
VITE_APP_API_BASEURL = / | ||
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 | ||
VITE_APP_DEBUG_TOOL = | ||
|
||
# 是否在打包时启用 Mock | ||
VITE_BUILD_MOCK = false | ||
# 是否在打包时生成 sourcemap | ||
VITE_BUILD_SOURCEMAP = false | ||
# 是否在打包时开启压缩,支持 gzip 和 brotli | ||
VITE_BUILD_COMPRESS = gzip,brotli | ||
# 是否在打包后生成存档,支持 zip 和 tar | ||
VITE_BUILD_ARCHIVE = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: deploy-example-site | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
# 选择要使用的 node 版本 | ||
node-version: 20 | ||
# registry-url: https://registry.npmmirror.com/ | ||
|
||
- uses: pnpm/action-setup@v3 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 9 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install antfu/ni | ||
run: npm i -g @antfu/ni | ||
|
||
- name: Install dependencies | ||
run: ni --frozen | ||
|
||
# 运行构建脚本 | ||
- name: Build | ||
env: | ||
NODE_OPTIONS: --max-old-space-size=8192 | ||
run: nr build:example | ||
|
||
- name: deploy | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: ./dist-example | ||
enable_jekyll: true | ||
force_orphan: true | ||
user_name: 'github-actions[bot]' | ||
user_email: 'github-actions[bot]@users.noreply.github.com' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
.DS_Store | ||
dist* | ||
dist-ssr | ||
*.local | ||
.eslintcache | ||
.stylelintcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"*.{ts,tsx,vue}": "eslint --cache --fix", | ||
"*.{css,scss,vue}": "stylelint --cache --fix" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false | ||
engine-strict=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"recommendations": [ | ||
"EditorConfig.EditorConfig", | ||
"mikestead.dotenv", | ||
"dbaeumer.vscode-eslint", | ||
"stylelint.vscode-stylelint", | ||
"Vue.volar", | ||
"antfu.unocss" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"typescript.preferences.autoImportFileExcludePatterns": ["vue-router$"], | ||
"eslint.experimental.useFlatConfig": true, | ||
"prettier.enable": false, | ||
"editor.formatOnSave": false, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.fixAll.stylelint": "explicit", | ||
"source.organizeImports": "never" | ||
}, | ||
"stylelint.validate": [ | ||
"css", | ||
"scss", | ||
"vue" | ||
], | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"vue", | ||
"html", | ||
"markdown", | ||
"json", | ||
"jsonc", | ||
"yaml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 fantastic-mobile | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
> [!IMPORTANT] | ||
> | ||
> 本仓库基于 Fantastic-mobile 源码开发,仅作为**UI组件库替换**演示用 | ||
> | ||
> 将 Vant 替换为 NutUI 的详情操作步骤请查看[官方文档](https://fantastic-mobile.github.io/guide/replace-to-nut.html) | ||
> | ||
> 无特别情况将不会与 Fantastic-mobile 最新源码同步,请勿将本仓库源码用于生产环境 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import antfu from '@antfu/eslint-config' | ||
|
||
export default antfu( | ||
{ | ||
unocss: true, | ||
ignores: [ | ||
'public', | ||
'dist*', | ||
], | ||
}, | ||
{ | ||
rules: { | ||
'eslint-comments/no-unlimited-disable': 'off', | ||
'curly': ['error', 'all'], | ||
'antfu/consistent-list-newline': 'off', | ||
}, | ||
}, | ||
{ | ||
files: [ | ||
'src/**/*.vue', | ||
], | ||
rules: { | ||
'vue/block-order': ['error', { | ||
order: ['script', 'template', 'style'], | ||
}], | ||
}, | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"/> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{ | ||
"type": "module", | ||
"version": "0.1.0", | ||
"engines": { | ||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" | ||
}, | ||
"scripts": { | ||
"dev": "vite", | ||
"build:example": "vue-tsc && vite build --mode example", | ||
"serve:example": "http-server ./dist-example -o", | ||
"svgo": "svgo -f src/assets/icons", | ||
"new": "plop", | ||
"lint": "npm-run-all -s lint:tsc lint:eslint lint:stylelint", | ||
"lint:tsc": "vue-tsc --noEmit", | ||
"lint:eslint": "eslint . --cache --fix", | ||
"lint:stylelint": "stylelint \"src/**/*.{css,scss,vue}\" --cache --fix", | ||
"postinstall": "simple-git-hooks", | ||
"preinstall": "npx only-allow pnpm", | ||
"commit": "git cz", | ||
"release": "bumpp" | ||
}, | ||
"dependencies": { | ||
"@headlessui/vue": "^1.7.22", | ||
"@nutui/nutui": "^4.3.9", | ||
"@nutui/touch-emulator": "^1.0.0", | ||
"@visactor/vchart": "^1.11.3", | ||
"@vueuse/core": "^10.11.0", | ||
"@vueuse/integrations": "^10.11.0", | ||
"animate.css": "^4.1.1", | ||
"axios": "^1.7.2", | ||
"dayjs": "^1.11.11", | ||
"echarts": "^5.5.0", | ||
"eruda": "^3.0.1", | ||
"lodash-es": "^4.17.21", | ||
"mitt": "^3.0.1", | ||
"mockjs": "^1.1.0", | ||
"nprogress": "^0.2.0", | ||
"overlayscrollbars-vue": "^0.5.9", | ||
"path-browserify": "^1.0.1", | ||
"pinia": "^2.1.7", | ||
"qrcode": "^1.5.3", | ||
"qs": "^6.12.1", | ||
"swiper": "^11.1.4", | ||
"vconsole": "^3.15.1", | ||
"vue": "^3.4.29", | ||
"vue-esign": "^1.1.4", | ||
"vue-m-message": "^4.0.2", | ||
"vue-router": "^4.3.3" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^2.21.1", | ||
"@iconify/json": "^2.2.219", | ||
"@iconify/vue": "^4.1.2", | ||
"@stylistic/stylelint-config": "^1.0.1", | ||
"@types/archiver": "^6.0.2", | ||
"@types/lodash-es": "^4.17.12", | ||
"@types/mockjs": "^1.0.10", | ||
"@types/nprogress": "^0.2.3", | ||
"@types/path-browserify": "^1.0.2", | ||
"@types/qrcode": "^1.5.5", | ||
"@types/qs": "^6.9.15", | ||
"@unocss/eslint-plugin": "^0.61.0", | ||
"@unocss/preset-rem-to-px": "^0.61.0", | ||
"@vitejs/plugin-vue": "^5.0.5", | ||
"@vitejs/plugin-vue-jsx": "^4.0.0", | ||
"@yeungkc/unocss-preset-safe-area": "^0.0.6", | ||
"archiver": "^7.0.1", | ||
"autoprefixer": "^10.4.19", | ||
"boxen": "^7.1.1", | ||
"bumpp": "^9.4.1", | ||
"cz-git": "^1.9.3", | ||
"eslint": "^9.5.0", | ||
"http-server": "^14.1.1", | ||
"lint-staged": "^15.2.7", | ||
"npm-run-all2": "^6.2.0", | ||
"picocolors": "^1.0.1", | ||
"plop": "^4.0.1", | ||
"postcss": "^8.4.38", | ||
"postcss-mobile-forever": "^4.1.4", | ||
"sass": "^1.77.5", | ||
"simple-git-hooks": "^2.11.1", | ||
"stylelint": "^16.6.1", | ||
"stylelint-config-recess-order": "^5.0.1", | ||
"stylelint-config-standard-scss": "^13.1.0", | ||
"stylelint-config-standard-vue": "^1.0.0", | ||
"stylelint-scss": "^6.3.1", | ||
"svgo": "^3.3.2", | ||
"typescript": "^5.4.5", | ||
"unocss": "^0.61.0", | ||
"unplugin-auto-import": "^0.17.6", | ||
"unplugin-turbo-console": "^1.8.6", | ||
"unplugin-vue-components": "^0.27.0", | ||
"unplugin-vue-router": "^0.9.1", | ||
"vite": "^5.3.1", | ||
"vite-plugin-banner": "^0.7.1", | ||
"vite-plugin-compression2": "^1.1.1", | ||
"vite-plugin-fake-server": "^2.1.1", | ||
"vite-plugin-pages": "^0.32.2", | ||
"vite-plugin-svg-icons": "^2.0.1", | ||
"vite-plugin-vue-devtools": "^7.3.0", | ||
"vue-tsc": "^2.0.21" | ||
}, | ||
"simple-git-hooks": { | ||
"pre-commit": "pnpm lint-staged", | ||
"preserveUnused": true | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "node_modules/cz-git" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script setup lang="ts"> | ||
{{#if isGlobal}} | ||
defineOptions({ | ||
name: '{{ properCase name }}', | ||
}) | ||
{{/if}} | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<!-- 布局 --> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
// 样式 | ||
</style> |
Oops, something went wrong.