wanzhuang-cli 1.0.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.
- package/.gitattributes +41 -0
- package/README.md +113 -0
- package/dist/commands/create.d.ts +10 -0
- package/dist/commands/create.js +145 -0
- package/dist/commands/generate.d.ts +8 -0
- package/dist/commands/generate.js +26 -0
- package/dist/commands/update.d.ts +6 -0
- package/dist/commands/update.js +26 -0
- package/dist/createApiTest/displayEnumLabel.d.ts +3 -0
- package/dist/createApiTest/displayEnumLabel.js +10 -0
- package/dist/createApiTest/displayTypeLabel.d.ts +19 -0
- package/dist/createApiTest/displayTypeLabel.js +135 -0
- package/dist/createApiTest/index.d.ts +6 -0
- package/dist/createApiTest/index.js +24 -0
- package/dist/createApiTest/pet.d.ts +58 -0
- package/dist/createApiTest/pet.js +102 -0
- package/dist/createApiTest/store.d.ts +28 -0
- package/dist/createApiTest/store.js +48 -0
- package/dist/createApiTest/types.d.ts +110 -0
- package/dist/createApiTest/types.js +17 -0
- package/dist/createApiTest/user.d.ts +50 -0
- package/dist/createApiTest/user.js +85 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +52 -0
- package/dist/utils/api.d.ts +1 -0
- package/dist/utils/api.js +48 -0
- package/dist/utils/configGen.d.ts +28 -0
- package/dist/utils/configGen.js +178 -0
- package/dist/utils/deps.d.ts +13 -0
- package/dist/utils/deps.js +47 -0
- package/dist/utils/fileOps.d.ts +29 -0
- package/dist/utils/fileOps.js +124 -0
- package/dist/utils/template.d.ts +12 -0
- package/dist/utils/template.js +31 -0
- package/package.json +44 -0
- package/src/commands/create.ts +141 -0
- package/src/commands/generate.ts +23 -0
- package/src/commands/update.ts +22 -0
- package/src/createApiTest/displayEnumLabel.ts +13 -0
- package/src/createApiTest/displayTypeLabel.ts +160 -0
- package/src/createApiTest/index.ts +10 -0
- package/src/createApiTest/pet.ts +159 -0
- package/src/createApiTest/store.ts +71 -0
- package/src/createApiTest/types.ts +134 -0
- package/src/createApiTest/user.ts +131 -0
- package/src/index.ts +54 -0
- package/src/utils/api.ts +47 -0
- package/src/utils/configGen.ts +139 -0
- package/src/utils/deps.ts +40 -0
- package/src/utils/fileOps.ts +86 -0
- package/src/utils/template.ts +32 -0
- package/templates/react/README.md +12 -0
- package/templates/react/eslint.config.js +33 -0
- package/templates/react/index.html +13 -0
- package/templates/react/package.json +27 -0
- package/templates/react/public/vite.svg +1 -0
- package/templates/react/src/App.css +42 -0
- package/templates/react/src/App.jsx +35 -0
- package/templates/react/src/assets/react.svg +1 -0
- package/templates/react/src/index.css +68 -0
- package/templates/react/src/main.jsx +10 -0
- package/templates/react/vite.config.js +7 -0
- package/templates/uniapp/index.html +20 -0
- package/templates/uniapp/package.json +67 -0
- package/templates/uniapp/shims-uni.d.ts +10 -0
- package/templates/uniapp/src/App.vue +17 -0
- package/templates/uniapp/src/main.js +10 -0
- package/templates/uniapp/src/manifest.json +72 -0
- package/templates/uniapp/src/pages/index/index.vue +48 -0
- package/templates/uniapp/src/pages.json +16 -0
- package/templates/uniapp/src/shime-uni.d.ts +6 -0
- package/templates/uniapp/src/static/logo.png +0 -0
- package/templates/uniapp/src/uni.scss +76 -0
- package/templates/uniapp/vite.config.js +8 -0
- package/templates/vue/.vscode/extensions.json +3 -0
- package/templates/vue/README.md +5 -0
- package/templates/vue/index.html +13 -0
- package/templates/vue/package.json +18 -0
- package/templates/vue/public/vite.svg +1 -0
- package/templates/vue/src/App.vue +30 -0
- package/templates/vue/src/assets/vue.svg +1 -0
- package/templates/vue/src/components/HelloWorld.vue +43 -0
- package/templates/vue/src/main.js +5 -0
- package/templates/vue/src/style.css +79 -0
- package/templates/vue/vite.config.js +7 -0
- package/tsconfig.json +19 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<script>
|
|
6
|
+
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
|
7
|
+
CSS.supports('top: constant(a)'))
|
|
8
|
+
document.write(
|
|
9
|
+
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
|
10
|
+
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
|
11
|
+
</script>
|
|
12
|
+
<title></title>
|
|
13
|
+
<!--preload-links-->
|
|
14
|
+
<!--app-context-->
|
|
15
|
+
</head>
|
|
16
|
+
<body>
|
|
17
|
+
<div id="app"><!--app-html--></div>
|
|
18
|
+
<script type="module" src="/src/main.js"></script>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "uni-preset-vue",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"dev:custom": "uni -p",
|
|
6
|
+
"dev:h5": "uni",
|
|
7
|
+
"dev:h5:ssr": "uni --ssr",
|
|
8
|
+
"dev:mp-alipay": "uni -p mp-alipay",
|
|
9
|
+
"dev:mp-baidu": "uni -p mp-baidu",
|
|
10
|
+
"dev:mp-jd": "uni -p mp-jd",
|
|
11
|
+
"dev:mp-kuaishou": "uni -p mp-kuaishou",
|
|
12
|
+
"dev:mp-lark": "uni -p mp-lark",
|
|
13
|
+
"dev:mp-qq": "uni -p mp-qq",
|
|
14
|
+
"dev:mp-toutiao": "uni -p mp-toutiao",
|
|
15
|
+
"dev:mp-harmony": "uni -p mp-harmony",
|
|
16
|
+
"dev:mp-weixin": "uni -p mp-weixin",
|
|
17
|
+
"dev:mp-xhs": "uni -p mp-xhs",
|
|
18
|
+
"dev:quickapp-webview": "uni -p quickapp-webview",
|
|
19
|
+
"dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
|
|
20
|
+
"dev:quickapp-webview-union": "uni -p quickapp-webview-union",
|
|
21
|
+
"build:custom": "uni build -p",
|
|
22
|
+
"build:h5": "uni build",
|
|
23
|
+
"build:h5:ssr": "uni build --ssr",
|
|
24
|
+
"build:mp-alipay": "uni build -p mp-alipay",
|
|
25
|
+
"build:mp-baidu": "uni build -p mp-baidu",
|
|
26
|
+
"build:mp-jd": "uni build -p mp-jd",
|
|
27
|
+
"build:mp-kuaishou": "uni build -p mp-kuaishou",
|
|
28
|
+
"build:mp-lark": "uni build -p mp-lark",
|
|
29
|
+
"build:mp-qq": "uni build -p mp-qq",
|
|
30
|
+
"build:mp-toutiao": "uni build -p mp-toutiao",
|
|
31
|
+
"build:mp-harmony": "uni build -p mp-harmony",
|
|
32
|
+
"build:mp-weixin": "uni build -p mp-weixin",
|
|
33
|
+
"build:mp-xhs": "uni build -p mp-xhs",
|
|
34
|
+
"build:quickapp-webview": "uni build -p quickapp-webview",
|
|
35
|
+
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
|
|
36
|
+
"build:quickapp-webview-union": "uni build -p quickapp-webview-union"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@dcloudio/uni-app": "3.0.0-4060420250429001",
|
|
40
|
+
"@dcloudio/uni-app-harmony": "3.0.0-4060420250429001",
|
|
41
|
+
"@dcloudio/uni-app-plus": "3.0.0-4060420250429001",
|
|
42
|
+
"@dcloudio/uni-components": "3.0.0-4060420250429001",
|
|
43
|
+
"@dcloudio/uni-h5": "3.0.0-4060420250429001",
|
|
44
|
+
"@dcloudio/uni-mp-alipay": "3.0.0-4060420250429001",
|
|
45
|
+
"@dcloudio/uni-mp-baidu": "3.0.0-4060420250429001",
|
|
46
|
+
"@dcloudio/uni-mp-harmony": "3.0.0-4060420250429001",
|
|
47
|
+
"@dcloudio/uni-mp-jd": "3.0.0-4060420250429001",
|
|
48
|
+
"@dcloudio/uni-mp-kuaishou": "3.0.0-4060420250429001",
|
|
49
|
+
"@dcloudio/uni-mp-lark": "3.0.0-4060420250429001",
|
|
50
|
+
"@dcloudio/uni-mp-qq": "3.0.0-4060420250429001",
|
|
51
|
+
"@dcloudio/uni-mp-toutiao": "3.0.0-4060420250429001",
|
|
52
|
+
"@dcloudio/uni-mp-weixin": "3.0.0-4060420250429001",
|
|
53
|
+
"@dcloudio/uni-mp-xhs": "3.0.0-4060420250429001",
|
|
54
|
+
"@dcloudio/uni-quickapp-webview": "3.0.0-4060420250429001",
|
|
55
|
+
"vue": "^3.4.21",
|
|
56
|
+
"vue-i18n": "^9.1.9"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@dcloudio/types": "^3.4.8",
|
|
60
|
+
"@dcloudio/uni-automator": "3.0.0-4060420250429001",
|
|
61
|
+
"@dcloudio/uni-cli-shared": "3.0.0-4060420250429001",
|
|
62
|
+
"@dcloudio/uni-stacktracey": "3.0.0-4060420250429001",
|
|
63
|
+
"@dcloudio/vite-plugin-uni": "3.0.0-4060420250429001",
|
|
64
|
+
"@vue/runtime-core": "^3.4.21",
|
|
65
|
+
"vite": "5.2.8"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export default {
|
|
3
|
+
onLaunch: function () {
|
|
4
|
+
console.log('App Launch')
|
|
5
|
+
},
|
|
6
|
+
onShow: function () {
|
|
7
|
+
console.log('App Show')
|
|
8
|
+
},
|
|
9
|
+
onHide: function () {
|
|
10
|
+
console.log('App Hide')
|
|
11
|
+
},
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<style>
|
|
16
|
+
/*每个页面公共css */
|
|
17
|
+
</style>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name" : "",
|
|
3
|
+
"appid" : "",
|
|
4
|
+
"description" : "",
|
|
5
|
+
"versionName" : "1.0.0",
|
|
6
|
+
"versionCode" : "100",
|
|
7
|
+
"transformPx" : false,
|
|
8
|
+
/* 5+App特有相关 */
|
|
9
|
+
"app-plus" : {
|
|
10
|
+
"usingComponents" : true,
|
|
11
|
+
"nvueStyleCompiler" : "uni-app",
|
|
12
|
+
"compilerVersion" : 3,
|
|
13
|
+
"splashscreen" : {
|
|
14
|
+
"alwaysShowBeforeRender" : true,
|
|
15
|
+
"waiting" : true,
|
|
16
|
+
"autoclose" : true,
|
|
17
|
+
"delay" : 0
|
|
18
|
+
},
|
|
19
|
+
/* 模块配置 */
|
|
20
|
+
"modules" : {},
|
|
21
|
+
/* 应用发布信息 */
|
|
22
|
+
"distribute" : {
|
|
23
|
+
/* android打包配置 */
|
|
24
|
+
"android" : {
|
|
25
|
+
"permissions" : [
|
|
26
|
+
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
|
27
|
+
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
|
28
|
+
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
|
29
|
+
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
|
30
|
+
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
|
31
|
+
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
|
32
|
+
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
|
33
|
+
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
|
34
|
+
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
|
35
|
+
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
|
36
|
+
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
|
37
|
+
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
|
38
|
+
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
|
39
|
+
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
|
40
|
+
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
/* ios打包配置 */
|
|
44
|
+
"ios" : {},
|
|
45
|
+
/* SDK配置 */
|
|
46
|
+
"sdkConfigs" : {}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
/* 快应用特有相关 */
|
|
50
|
+
"quickapp" : {},
|
|
51
|
+
/* 小程序特有相关 */
|
|
52
|
+
"mp-weixin" : {
|
|
53
|
+
"appid" : "",
|
|
54
|
+
"setting" : {
|
|
55
|
+
"urlCheck" : false
|
|
56
|
+
},
|
|
57
|
+
"usingComponents" : true
|
|
58
|
+
},
|
|
59
|
+
"mp-alipay" : {
|
|
60
|
+
"usingComponents" : true
|
|
61
|
+
},
|
|
62
|
+
"mp-baidu" : {
|
|
63
|
+
"usingComponents" : true
|
|
64
|
+
},
|
|
65
|
+
"mp-toutiao" : {
|
|
66
|
+
"usingComponents" : true
|
|
67
|
+
},
|
|
68
|
+
"uniStatistics" : {
|
|
69
|
+
"enable" : false
|
|
70
|
+
},
|
|
71
|
+
"vueVersion" : "3"
|
|
72
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="content">
|
|
3
|
+
<image class="logo" src="/static/logo.png"></image>
|
|
4
|
+
<view class="text-area">
|
|
5
|
+
<text class="title">{{ title }}</text>
|
|
6
|
+
</view>
|
|
7
|
+
</view>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
data() {
|
|
13
|
+
return {
|
|
14
|
+
title: 'Hello',
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
onLoad() {},
|
|
18
|
+
methods: {},
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<style>
|
|
23
|
+
.content {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.logo {
|
|
31
|
+
height: 200rpx;
|
|
32
|
+
width: 200rpx;
|
|
33
|
+
margin-top: 200rpx;
|
|
34
|
+
margin-left: auto;
|
|
35
|
+
margin-right: auto;
|
|
36
|
+
margin-bottom: 50rpx;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.text-area {
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.title {
|
|
45
|
+
font-size: 36rpx;
|
|
46
|
+
color: #8f8f94;
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
|
3
|
+
{
|
|
4
|
+
"path": "pages/index/index",
|
|
5
|
+
"style": {
|
|
6
|
+
"navigationBarTitleText": "uni-app"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"globalStyle": {
|
|
11
|
+
"navigationBarTextStyle": "black",
|
|
12
|
+
"navigationBarTitleText": "uni-app",
|
|
13
|
+
"navigationBarBackgroundColor": "#F8F8F8",
|
|
14
|
+
"backgroundColor": "#F8F8F8"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 这里是uni-app内置的常用样式变量
|
|
3
|
+
*
|
|
4
|
+
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
|
5
|
+
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
|
11
|
+
*
|
|
12
|
+
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/* 颜色变量 */
|
|
16
|
+
|
|
17
|
+
/* 行为相关颜色 */
|
|
18
|
+
$uni-color-primary: #007aff;
|
|
19
|
+
$uni-color-success: #4cd964;
|
|
20
|
+
$uni-color-warning: #f0ad4e;
|
|
21
|
+
$uni-color-error: #dd524d;
|
|
22
|
+
|
|
23
|
+
/* 文字基本颜色 */
|
|
24
|
+
$uni-text-color: #333; // 基本色
|
|
25
|
+
$uni-text-color-inverse: #fff; // 反色
|
|
26
|
+
$uni-text-color-grey: #999; // 辅助灰色,如加载更多的提示信息
|
|
27
|
+
$uni-text-color-placeholder: #808080;
|
|
28
|
+
$uni-text-color-disable: #c0c0c0;
|
|
29
|
+
|
|
30
|
+
/* 背景颜色 */
|
|
31
|
+
$uni-bg-color: #fff;
|
|
32
|
+
$uni-bg-color-grey: #f8f8f8;
|
|
33
|
+
$uni-bg-color-hover: #f1f1f1; // 点击状态颜色
|
|
34
|
+
$uni-bg-color-mask: rgba(0, 0, 0, 0.4); // 遮罩颜色
|
|
35
|
+
|
|
36
|
+
/* 边框颜色 */
|
|
37
|
+
$uni-border-color: #c8c7cc;
|
|
38
|
+
|
|
39
|
+
/* 尺寸变量 */
|
|
40
|
+
|
|
41
|
+
/* 文字尺寸 */
|
|
42
|
+
$uni-font-size-sm: 12px;
|
|
43
|
+
$uni-font-size-base: 14px;
|
|
44
|
+
$uni-font-size-lg: 16;
|
|
45
|
+
|
|
46
|
+
/* 图片尺寸 */
|
|
47
|
+
$uni-img-size-sm: 20px;
|
|
48
|
+
$uni-img-size-base: 26px;
|
|
49
|
+
$uni-img-size-lg: 40px;
|
|
50
|
+
|
|
51
|
+
/* Border Radius */
|
|
52
|
+
$uni-border-radius-sm: 2px;
|
|
53
|
+
$uni-border-radius-base: 3px;
|
|
54
|
+
$uni-border-radius-lg: 6px;
|
|
55
|
+
$uni-border-radius-circle: 50%;
|
|
56
|
+
|
|
57
|
+
/* 水平间距 */
|
|
58
|
+
$uni-spacing-row-sm: 5px;
|
|
59
|
+
$uni-spacing-row-base: 10px;
|
|
60
|
+
$uni-spacing-row-lg: 15px;
|
|
61
|
+
|
|
62
|
+
/* 垂直间距 */
|
|
63
|
+
$uni-spacing-col-sm: 4px;
|
|
64
|
+
$uni-spacing-col-base: 8px;
|
|
65
|
+
$uni-spacing-col-lg: 12px;
|
|
66
|
+
|
|
67
|
+
/* 透明度 */
|
|
68
|
+
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
|
|
69
|
+
|
|
70
|
+
/* 文章场景相关 */
|
|
71
|
+
$uni-color-title: #2c405a; // 文章标题颜色
|
|
72
|
+
$uni-font-size-title: 20px;
|
|
73
|
+
$uni-color-subtitle: #555; // 二级标题颜色
|
|
74
|
+
$uni-font-size-subtitle: 18px;
|
|
75
|
+
$uni-color-paragraph: #3f536e; // 文章段落颜色
|
|
76
|
+
$uni-font-size-paragraph: 15px;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Vue 3 + Vite
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
+
|
|
5
|
+
Learn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Vite + Vue</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
<script type="module" src="/src/main.js"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vue",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"vue": "^3.5.13"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
16
|
+
"vite": "^6.3.5"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import HelloWorld from './components/HelloWorld.vue'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div>
|
|
7
|
+
<a href="https://vite.dev" target="_blank">
|
|
8
|
+
<img src="/vite.svg" class="logo" alt="Vite logo" />
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://vuejs.org/" target="_blank">
|
|
11
|
+
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
|
|
12
|
+
</a>
|
|
13
|
+
</div>
|
|
14
|
+
<HelloWorld msg="Vite + Vue" />
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<style scoped>
|
|
18
|
+
.logo {
|
|
19
|
+
height: 6em;
|
|
20
|
+
padding: 1.5em;
|
|
21
|
+
will-change: filter;
|
|
22
|
+
transition: filter 300ms;
|
|
23
|
+
}
|
|
24
|
+
.logo:hover {
|
|
25
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
26
|
+
}
|
|
27
|
+
.logo.vue:hover {
|
|
28
|
+
filter: drop-shadow(0 0 2em #42b883aa);
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
defineProps({
|
|
5
|
+
msg: String,
|
|
6
|
+
})
|
|
7
|
+
|
|
8
|
+
const count = ref(0)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<h1>{{ msg }}</h1>
|
|
13
|
+
|
|
14
|
+
<div class="card">
|
|
15
|
+
<button type="button" @click="count++">count is {{ count }}</button>
|
|
16
|
+
<p>
|
|
17
|
+
Edit
|
|
18
|
+
<code>components/HelloWorld.vue</code> to test HMR
|
|
19
|
+
</p>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<p>
|
|
23
|
+
Check out
|
|
24
|
+
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
|
25
|
+
>create-vue</a
|
|
26
|
+
>, the official Vue + Vite starter
|
|
27
|
+
</p>
|
|
28
|
+
<p>
|
|
29
|
+
Learn more about IDE Support for Vue in the
|
|
30
|
+
<a
|
|
31
|
+
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
|
|
32
|
+
target="_blank"
|
|
33
|
+
>Vue Docs Scaling up Guide</a
|
|
34
|
+
>.
|
|
35
|
+
</p>
|
|
36
|
+
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<style scoped>
|
|
40
|
+
.read-the-docs {
|
|
41
|
+
color: #888;
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
|
8
|
+
background-color: #242424;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
a {
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
color: #646cff;
|
|
19
|
+
text-decoration: inherit;
|
|
20
|
+
}
|
|
21
|
+
a:hover {
|
|
22
|
+
color: #535bf2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
body {
|
|
26
|
+
margin: 0;
|
|
27
|
+
display: flex;
|
|
28
|
+
place-items: center;
|
|
29
|
+
min-width: 320px;
|
|
30
|
+
min-height: 100vh;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
h1 {
|
|
34
|
+
font-size: 3.2em;
|
|
35
|
+
line-height: 1.1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
button {
|
|
39
|
+
border-radius: 8px;
|
|
40
|
+
border: 1px solid transparent;
|
|
41
|
+
padding: 0.6em 1.2em;
|
|
42
|
+
font-size: 1em;
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
font-family: inherit;
|
|
45
|
+
background-color: #1a1a1a;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
transition: border-color 0.25s;
|
|
48
|
+
}
|
|
49
|
+
button:hover {
|
|
50
|
+
border-color: #646cff;
|
|
51
|
+
}
|
|
52
|
+
button:focus,
|
|
53
|
+
button:focus-visible {
|
|
54
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.card {
|
|
58
|
+
padding: 2em;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
#app {
|
|
62
|
+
max-width: 1280px;
|
|
63
|
+
margin: 0 auto;
|
|
64
|
+
padding: 2rem;
|
|
65
|
+
text-align: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@media (prefers-color-scheme: light) {
|
|
69
|
+
:root {
|
|
70
|
+
color: #213547;
|
|
71
|
+
background-color: #ffffff;
|
|
72
|
+
}
|
|
73
|
+
a:hover {
|
|
74
|
+
color: #747bff;
|
|
75
|
+
}
|
|
76
|
+
button {
|
|
77
|
+
background-color: #f9f9f9;
|
|
78
|
+
}
|
|
79
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2018",
|
|
4
|
+
"module": "CommonJS",
|
|
5
|
+
"lib": ["ES2018", "DOM"],
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"outDir": "./dist",
|
|
8
|
+
"rootDir": "./src",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"jsx": "react",
|
|
15
|
+
"moduleResolution": "node"
|
|
16
|
+
},
|
|
17
|
+
"include": ["src/**/*"],
|
|
18
|
+
"exclude": ["node_modules", "dist"]
|
|
19
|
+
}
|