yuang-framework-ui-pc 1.0.0 → 1.0.1
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/package.json +9 -2
- package/src/App.vue +1 -1
- package/src/main.ts +8 -3
- package/src/packages/index.js +1 -1
- package/src/shims-vue.d.ts +10 -0
- package/env.d.ts +0 -1
- package/index.html +0 -13
- package/public/favicon.ico +0 -0
- package/tsconfig.app.json +0 -14
- package/tsconfig.json +0 -17
- package/tsconfig.node.json +0 -19
- package/tsconfig.vitest.json +0 -11
- package/vite.config.ts +0 -45
- package/vitest.config.ts +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yuang-framework-ui-pc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
16
16
|
"format": "prettier --write src/"
|
|
17
17
|
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"src"
|
|
21
|
+
],
|
|
22
|
+
"main": "dist/yuang-framework-ui-pc.umd.js",
|
|
23
|
+
"module": "dist/yuang-framework-ui-pc.es.js",
|
|
24
|
+
"unpkg": "dist/yuang-framework-ui-pc.iife.js",
|
|
18
25
|
"author": "yuang",
|
|
19
26
|
"license": "ISC",
|
|
20
27
|
"dependencies": {
|
|
@@ -51,6 +58,6 @@
|
|
|
51
58
|
"vite": "^5.3.1",
|
|
52
59
|
"vite-plugin-vue-devtools": "^7.3.1",
|
|
53
60
|
"vitest": "^1.6.0",
|
|
54
|
-
"vue-tsc": "^2.
|
|
61
|
+
"vue-tsc": "^2.1.6"
|
|
55
62
|
}
|
|
56
63
|
}
|
package/src/App.vue
CHANGED
package/src/main.ts
CHANGED
|
@@ -29,6 +29,11 @@ app.use(ElementPlus)
|
|
|
29
29
|
app.mount('#app')
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
/*
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
npm config set registry=https://registry.npmjs.org
|
|
36
|
+
npm config set registry=https://registry.npmmirror.com
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
*/
|
package/src/packages/index.js
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* shims-vue.d.ts文件是一种声明文件,用来告诉TypeScript如何处理.vue文件,填补TypeScript对.vue文件类型识别缺失的文件,为Vue.js的单文件组件提供类型定义支持。
|
|
3
|
+
* 否则会报错:Vue: Could not find a declaration file for module @/packages/YuButton/index.
|
|
4
|
+
*/
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
declare module '*.vue' {
|
|
7
|
+
import type { DefineComponent } from 'vue';
|
|
8
|
+
const component: DefineComponent<{}, {}, any>;
|
|
9
|
+
export default component;
|
|
10
|
+
}
|
package/env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
package/index.html
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<link rel="icon" href="/favicon.ico">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>Vite App</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="app"></div>
|
|
11
|
-
<script type="module" src="/src/main.ts"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
package/public/favicon.ico
DELETED
|
Binary file
|
package/tsconfig.app.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
-
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
|
4
|
-
"exclude": ["src/**/__tests__/*"],
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"composite": true,
|
|
7
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
8
|
-
|
|
9
|
-
"baseUrl": ".",
|
|
10
|
-
"paths": {
|
|
11
|
-
"@/*": ["./src/*"]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
package/tsconfig.json
DELETED
package/tsconfig.node.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@tsconfig/node20/tsconfig.json",
|
|
3
|
-
"include": [
|
|
4
|
-
"vite.config.*",
|
|
5
|
-
"vitest.config.*",
|
|
6
|
-
"cypress.config.*",
|
|
7
|
-
"nightwatch.conf.*",
|
|
8
|
-
"playwright.config.*"
|
|
9
|
-
],
|
|
10
|
-
"compilerOptions": {
|
|
11
|
-
"composite": true,
|
|
12
|
-
"noEmit": true,
|
|
13
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
14
|
-
|
|
15
|
-
"module": "ESNext",
|
|
16
|
-
"moduleResolution": "Bundler",
|
|
17
|
-
"types": ["node"]
|
|
18
|
-
}
|
|
19
|
-
}
|
package/tsconfig.vitest.json
DELETED
package/vite.config.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath, URL } from 'node:url'
|
|
2
|
-
|
|
3
|
-
import { defineConfig } from 'vite'
|
|
4
|
-
import vue from '@vitejs/plugin-vue'
|
|
5
|
-
import vueJsx from '@vitejs/plugin-vue-jsx'
|
|
6
|
-
|
|
7
|
-
// https://vitejs.dev/config/
|
|
8
|
-
export default defineConfig({
|
|
9
|
-
base: "/framework-ui-pc",
|
|
10
|
-
server: {
|
|
11
|
-
port: 8110,
|
|
12
|
-
proxy: {
|
|
13
|
-
'/sso-api': {
|
|
14
|
-
target: 'http://localhost:8150/sso-api', // 目标服务器的地址
|
|
15
|
-
changeOrigin: true,
|
|
16
|
-
rewrite: (path) => path.replace(/^\/sso-api/, '') // 将请求路径中的'/api'替换为空字符串
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
plugins: [
|
|
21
|
-
vue(),
|
|
22
|
-
vueJsx(),
|
|
23
|
-
],
|
|
24
|
-
resolve: {
|
|
25
|
-
alias: {
|
|
26
|
-
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
build: {
|
|
30
|
-
lib: {
|
|
31
|
-
entry: './src/packages/index.js',
|
|
32
|
-
name: 'yuang-framework-ui-pc',
|
|
33
|
-
fileName: (format) => `yuang-framework-ui-pc.${format}.js`,
|
|
34
|
-
},
|
|
35
|
-
rollupOptions: {
|
|
36
|
-
// 确保外部化处理依赖
|
|
37
|
-
external: ['vue'],
|
|
38
|
-
output: {
|
|
39
|
-
globals: {
|
|
40
|
-
vue: 'Vue',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
})
|
package/vitest.config.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url'
|
|
2
|
-
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config'
|
|
3
|
-
import viteConfig from './vite.config'
|
|
4
|
-
|
|
5
|
-
export default mergeConfig(
|
|
6
|
-
viteConfig,
|
|
7
|
-
defineConfig({
|
|
8
|
-
test: {
|
|
9
|
-
environment: 'jsdom',
|
|
10
|
-
exclude: [...configDefaults.exclude, 'e2e/**'],
|
|
11
|
-
root: fileURLToPath(new URL('./', import.meta.url))
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
)
|