Skip to content

Commit

Permalink
chore: 构建更换为 vite
Browse files Browse the repository at this point in the history
  • Loading branch information
aweikalee committed Aug 5, 2023
1 parent d1e4b12 commit 578479c
Show file tree
Hide file tree
Showing 44 changed files with 11,463 additions and 1,242 deletions.
9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

8 changes: 4 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VUE_APP_FILE_PUBLIC = 'public'
VUE_APP_FILE_SELF = 'tripnote'
VUE_APP_URL_BASE = '/public/'
VUE_APP_URL_SELF = '/public/tripnote/'
VITE_FILE_PUBLIC = 'public'
VITE_FILE_SELF = 'tripnote'
VITE_URL_BASE = '/public/'
VITE_URL_SELF = '/public/tripnote/'
10 changes: 4 additions & 6 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
NODE_ENV = 'development'

VUE_APP_FILE_PUBLIC = ''
VUE_APP_FILE_SELF = 'tripnote'
VUE_APP_URL_BASE = '/'
VUE_APP_URL_SELF = '/tripnote/'
VITE_FILE_PUBLIC = ''
VITE_FILE_SELF = 'tripnote'
VITE_URL_BASE = '/'
VITE_URL_SELF = '/tripnote/'
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Deploy
on:
push:
branches:
- master
- main

jobs:
build-and-deploy:
Expand All @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: '14.x'
node-version: '16.x'

- name: Install and Build
run: |
Expand Down
29 changes: 14 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
.DS_Store
node_modules
/dist

/tests/e2e/videos/
/tests/e2e/screenshots/

# local env files
.env.local
.env.*.local

# Log files
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.vscode
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
/package-lock.json
*.sw?
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}
12 changes: 0 additions & 12 deletions babel.config.js

This file was deleted.

3 changes: 0 additions & 3 deletions cypress.json

This file was deleted.

146 changes: 146 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="/favicon.ico" />
<meta name="description" content="旅游手账 —— 毛呆">

<meta name="theme-color" content="#FFFFFF" />

<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-mobile-web-app-title" content="旅游手账" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="apple-touch-startup-image" href="/apple-touch-icon.png" />
<link
href="/apple-touch-startup-image/750x1294.png"
media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image"
/>

<meta name="msapplication-TileImage" content="android-chrome-192x192.png" />
<meta name="msapplication-TileColor" content="#ffffff" />
<!-- 关闭winphone选中时高亮 -->
<meta name="msapplication-tap-highlight" content="no" />

<!-- 使一些国产浏览器优先使用Webkit核心 -->
<meta name="renderer" content="webkit" />

<title>旅游手账 —— 毛呆</title>

<!-- HTML字体大小 -->
<style>
html {
font-size: 10px;
}
@media screen and (min-width: 330px) and (max-width: 480px) {
html {
font-size: 11px;
}
}
@media screen and (min-width: 480px) and (max-width: 750px) {
html {
font-size: 12px;
}
}
@media screen and (min-width: 750px) {
html {
font-size: 13px;
}
}
</style>

<script>
/* 解决safari阅读列表无法正常后退的问题 */
window.onunload = function () {}
</script>
</head>
<body>
<div id="loading-wrapper">
<noscript>
<strong
>很抱歉,如果没有启用JavaScript,项目将无法正常运行。请先启用它。</strong
>
</noscript>
<!-- 加载动画 -->
<style>
.enter-loading {
position: fixed;
z-index: 99999;
background-color: rgba(245, 245, 245, 0.3);
margin: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
-webkit-transition: opacity 0.3s;
transition: opacity 0.3s;
}
.enter-loading__spinner {
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
width: 100%;
text-align: center;
position: absolute;
}
@keyframes loading-rotate {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loading-dash {
0% {
stroke-dasharray: 1, 200;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -40px;
}
100% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -120px;
}
}
.enter-loading__circular {
height: 5rem;
width: 5rem;
-webkit-animation: loading-rotate 2s linear infinite;
animation: loading-rotate 2s linear infinite;
}
.enter-loading__circular .path {
-webkit-animation: loading-dash 1.5s ease-in-out infinite;
animation: loading-dash 1.5s ease-in-out infinite;
stroke-dasharray: 90, 150;
stroke-dashoffset: 0;
stroke-width: 0.3rem;
stroke: #77ddcc;
stroke-linecap: round;
}
.enter-loading__text {
color: #77ddcc;
margin: 0.3rem 0;
font-size: 1.4rem;
}
</style>
<div class="enter-loading" style="display: none" id="loading">
<div class="enter-loading__spinner">
<svg viewBox="25 25 50 50" class="enter-loading__circular">
<circle cx="50" cy="50" r="20" fill="none" class="path"></circle>
</svg>
<p class="enter-loading__text">初始化中</p>
</div>
</div>
<script>
document.getElementById("loading").style.display = null
</script>
</div>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Binary file removed mocks/400x400.png
Binary file not shown.
Loading

0 comments on commit 578479c

Please sign in to comment.