Skip to content

Commit

Permalink
feat(thin): add Thin Version (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklin committed May 9, 2024
1 parent 62a9650 commit 2d54358
Show file tree
Hide file tree
Showing 137 changed files with 8,471 additions and 18 deletions.
5 changes: 5 additions & 0 deletions apps/thin/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# The title of your application (string)
VITE_GLOB_APP_TITLE='Celeris Web Thin'

# port
VITE_PORT=8888
57 changes: 57 additions & 0 deletions apps/thin/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# App Environment Variables

NODE_ENV="development"

# Whether to use mock data (true/false)
VITE_USE_MOCK=false

# Whether to enable build analyzer (true/false)
VITE_USE_BUILD_ANALYZER=false

# Whether to enable PWA (true/false)
VITE_USE_PWA=true

# The public path for assets in your application
VITE_PUBLIC_PATH=/

# Proxy settings for your development server (array of [string, string] pairs)
VITE_PROXY=[["/api","http://localhost:8899"]]

# Basic interface address SPA
VITE_GLOB_API_URL=/api

# Basic interface address SSR
VITE_GLOB_API_URL_SSR=/api

# Basic interface address prefix
VITE_GLOB_API_URL_PREFIX=

# The title of your application (string)
VITE_GLOB_APP_TITLE="Celeris Web Thin"

# The short name of your application (string)
VITE_GLOB_APP_SHORT_NAME="Celeris_Web_Thin"

# Whether to use a CDN for assets (true/false)
VITE_USE_CDN=false

# Whether to drop console.log statements (true/false)
VITE_DROP_CONSOLE=false

# Whether to use HTTPS for your development server (true/false)
VITE_USE_HTTPS=false

# The compression algorithm to use when building your application (gzip/brotli/none)
VITE_BUILD_COMPRESS=gzip

# Whether to delete the original file after compressing it (true/false)
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE=false

# Whether to build your application in legacy mode (true/false)
VITE_LEGACY=true

# Whether to use imagemin to optimize images during build (true/false)
VITE_USE_IMAGEMIN=true

# Whether to generate a configuration file (true/false)
VITE_GLOB_BUILD_GENERATE_CONFIG=true
57 changes: 57 additions & 0 deletions apps/thin/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# App Environment Variables

NODE_ENV="production"

# Whether to use mock data (true/false)
VITE_USE_MOCK=false

# Whether to enable build analyzer (true/false)
VITE_USE_BUILD_ANALYZER=false

# Whether to enable PWA (true/false)
VITE_USE_PWA=true

# The public path for assets in your application
VITE_PUBLIC_PATH=/

# Proxy settings for your development server (array of [string, string] pairs)
VITE_PROXY=[["/api","https://celeris-web-api.vercel.app/"]]

# Basic interface address SPA
VITE_GLOB_API_URL=/api

# Basic interface address SSR
VITE_GLOB_API_URL_SSR=/api

# Basic interface address prefix
VITE_GLOB_API_URL_PREFIX=

# The title of your application (string)
VITE_GLOB_APP_TITLE="Celeris Web Thin"

# The short name of your application (string)
VITE_GLOB_APP_SHORT_NAME="Celeris_Web_Thin"

# Whether to use a CDN for assets (true/false)
VITE_USE_CDN=false

# Whether to drop console.log statements (true/false)
VITE_DROP_CONSOLE=true

# Whether to use HTTPS for your development server (true/false)
VITE_USE_HTTPS=false

# The compression algorithm to use when building your application (gzip/brotli/none)
VITE_BUILD_COMPRESS=gzip

# Whether to delete the original file after compressing it (true/false)
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE=false

# Whether to build your application in legacy mode (true/false)
VITE_LEGACY=true

# Whether to use imagemin to optimize images during build (true/false)
VITE_USE_IMAGEMIN=true

# Whether to generate a configuration file (true/false)
VITE_GLOB_BUILD_GENERATE_CONFIG=true
5 changes: 5 additions & 0 deletions apps/thin/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 测试环境
NODE_ENV="test"

# 测试环境接口地址
VITE_API_URL="/api"
932 changes: 932 additions & 0 deletions apps/thin/autoResolver/auto-imports.d.ts

Large diffs are not rendered by default.

71 changes: 71 additions & 0 deletions apps/thin/autoResolver/components.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/* eslint-disable */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}

/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
CAAppLogo: typeof import('@celeris/components')['CAAppLogo']
CAAppNaiveUIProvider: typeof import('@celeris/components')['CAAppNaiveUIProvider']
CACharts: typeof import('@celeris/components')['CACharts']
CAIcon: typeof import('@celeris/components')['CAIcon']
NAlert: typeof import('@celeris/ca-components')['NAlert']
NAvatar: typeof import('@celeris/ca-components')['NAvatar']
NBadge: typeof import('@celeris/ca-components')['NBadge']
NBreadcrumb: typeof import('@celeris/ca-components')['NBreadcrumb']
NBreadcrumbItem: typeof import('@celeris/ca-components')['NBreadcrumbItem']
NButton: typeof import('@celeris/ca-components')['NButton']
NCard: typeof import('@celeris/ca-components')['NCard']
NCheckbox: typeof import('@celeris/ca-components')['NCheckbox']
NCol: typeof import('@celeris/ca-components')['NCol']
NCollapse: typeof import('@celeris/ca-components')['NCollapse']
NCollapseItem: typeof import('@celeris/ca-components')['NCollapseItem']
NColorPicker: typeof import('@celeris/ca-components')['NColorPicker']
NConfigProvider: typeof import('@celeris/ca-components')['NConfigProvider']
NDescriptions: typeof import('@celeris/ca-components')['NDescriptions']
NDescriptionsItem: typeof import('@celeris/ca-components')['NDescriptionsItem']
NDialogProvider: typeof import('@celeris/ca-components')['NDialogProvider']
NDivider: typeof import('@celeris/ca-components')['NDivider']
NDrawer: typeof import('@celeris/ca-components')['NDrawer']
NDrawerContent: typeof import('@celeris/ca-components')['NDrawerContent']
NDropdown: typeof import('@celeris/ca-components')['NDropdown']
NEl: typeof import('@celeris/ca-components')['NEl']
NEmpty: typeof import('@celeris/ca-components')['NEmpty']
NForm: typeof import('@celeris/ca-components')['NForm']
NFormItem: typeof import('@celeris/ca-components')['NFormItem']
NGlobalStyle: typeof import('@celeris/ca-components')['NGlobalStyle']
NGrid: typeof import('@celeris/ca-components')['NGrid']
NGridItem: typeof import('@celeris/ca-components')['NGridItem']
NInput: typeof import('@celeris/ca-components')['NInput']
NLayout: typeof import('@celeris/ca-components')['NLayout']
NLayoutContent: typeof import('@celeris/ca-components')['NLayoutContent']
NLayoutSider: typeof import('@celeris/ca-components')['NLayoutSider']
NLoadingBarProvider: typeof import('@celeris/ca-components')['NLoadingBarProvider']
NMenu: typeof import('@celeris/ca-components')['NMenu']
NMessageProvider: typeof import('@celeris/ca-components')['NMessageProvider']
NModal: typeof import('@celeris/ca-components')['NModal']
NNotificationProvider: typeof import('@celeris/ca-components')['NNotificationProvider']
NPagination: typeof import('@celeris/ca-components')['NPagination']
NPopover: typeof import('@celeris/ca-components')['NPopover']
NResult: typeof import('@celeris/ca-components')['NResult']
NRow: typeof import('@celeris/ca-components')['NRow']
NScrollbar: typeof import('@celeris/ca-components')['NScrollbar']
NSelect: typeof import('@celeris/ca-components')['NSelect']
NSpace: typeof import('@celeris/ca-components')['NSpace']
NSpin: typeof import('@celeris/ca-components')['NSpin']
NSplit: typeof import('@celeris/ca-components')['NSplit']
NStatistic: typeof import('@celeris/ca-components')['NStatistic']
NStep: typeof import('@celeris/ca-components')['NStep']
NSteps: typeof import('@celeris/ca-components')['NSteps']
NSwitch: typeof import('@celeris/ca-components')['NSwitch']
NTable: typeof import('@celeris/ca-components')['NTable']
NText: typeof import('@celeris/ca-components')['NText']
NTime: typeof import('@celeris/ca-components')['NTime']
NTooltip: typeof import('@celeris/ca-components')['NTooltip']
NVirtualList: typeof import('@celeris/ca-components')['NVirtualList']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
}
115 changes: 115 additions & 0 deletions apps/thin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<!doctype html>
<html lang="zh-hans">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Celeris Web</title>
<meta
name="description"
content="Celeris Web is a free and open-source front-end development framework that enables streamlined web development with powerful tools and features, including natural language processing capabilities."
/>
<meta
name="keywords"
content="Celeris Web, Vue 3, Vite, TypeScript, monorepo approach, OpenAI's ChatGPT API, front-end development, web development, web applications, open-source, natural language processing capabilities, developer tools, modern web development, collaborative development, project management, dependency management, TypeScript syntax, Vue Router, page loading speed, component library, API integration, internationalization support, responsive design"
/>
</head>
<body>
<div id="app">
<style>
.app-loading {
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #f4f7f9;
}

.app-loading .app-loading-wrap {
position: absolute;
top: 50%;
left: 50%;
display: flex;
transform: translate3d(-50%, -50%, 0);
justify-content: center;
align-items: center;
flex-direction: column;
}

.loader {
width: 48px;
height: 48px;
margin: auto;
position: relative;
}

.loader:before {
content: "";
width: 48px;
height: 5px;
background: #f0808050;
position: absolute;
top: 60px;
left: 0;
border-radius: 50%;
animation: shadow324 0.5s linear infinite;
}

.loader:after {
content: "";
width: 100%;
height: 100%;
background: #f08080;
position: absolute;
top: 0;
left: 0;
border-radius: 4px;
animation: jump7456 0.5s linear infinite;
}

@keyframes jump7456 {
15% {
border-bottom-right-radius: 3px;
}

25% {
transform: translateY(9px) rotate(22.5deg);
}

50% {
transform: translateY(18px) scale(1, 0.9) rotate(45deg);
border-bottom-right-radius: 40px;
}

75% {
transform: translateY(9px) rotate(67.5deg);
}

100% {
transform: translateY(0) rotate(90deg);
}
}

@keyframes shadow324 {
0%,
100% {
transform: scale(1, 1);
}

50% {
transform: scale(1.2, 1);
}
}
</style>
<div class="app-loading">
<div class="app-loading-wrap">
<div class="loader"></div>
</div>
</div>
</div>

<script type="module" src="/src/main.ts"></script>
</body>
</html>
64 changes: 64 additions & 0 deletions apps/thin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "@celeris/admin-thin",
"type": "module",
"version": "0.0.2",
"packageManager": "pnpm@9.1.0",
"description": "Celeris Web",
"author": "Kirk Lin (https://github.com/kirklin)",
"license": "MIT",
"homepage": "https://github.com/kirklin/celeris-web",
"keywords": [
"celeris-web-admin",
"celeris-web",
"celeris",
"vite",
"unocss",
"fast",
"boot"
],
"main": "src/main.ts",
"scripts": {
"dev": "vite",
"build": "pnpm cross-env NODE_ENV=production vite build",
"clean": "pnpm rimraf node_modules && pnpm rimraf dist",
"typecheck": "vue-tsc --noEmit --skipLibCheck",
"preview": "npm run build && vite preview",
"preview:dist": "vite preview"
},
"dependencies": {
"@celeris/constants": "workspace:*",
"@celeris/directives": "workspace:*",
"@celeris/locale": "workspace:*",
"@celeris/request": "workspace:*",
"@celeris/styles": "workspace:*",
"@celeris/utils": "workspace:*",
"destr": "^2.0.3",
"headless-highlighter": "^0.0.0",
"nprogress": "^0.2.0",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
"pkg-types": "^1.1.0",
"vue": "^3.4.27",
"vue-i18n": "^9.13.1",
"vue-router": "^4.3.2"
},
"devDependencies": {
"@celeris/admin-api": "workspace:*",
"@celeris/assets": "workspace:*",
"@celeris/ca-components": "workspace:*",
"@celeris/components": "workspace:*",
"@celeris/hooks": "workspace:*",
"@celeris/types": "workspace:*",
"@celeris/vite": "workspace:*",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/compiler-dom": "^3.4.27",
"@vue/test-utils": "^2.4.6",
"jsdom": "^24.0.0",
"pnpm": "^9.1.0",
"typescript": "^5.4.5",
"unocss": "^0.60.0",
"vite": "^5.2.11",
"vitest": "^1.6.0",
"vue-tsc": "^2.0.16"
}
}
Binary file added apps/thin/public/favicon.ico
Binary file not shown.
Loading

0 comments on commit 2d54358

Please sign in to comment.