@melt-js/comps-vue2 0.0.0-stage → 2026.11.5
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/README.md +35 -2
- package/hel_dist/css/chunk-e3b20906.1a16268b.css +1 -0
- package/hel_dist/entry.js +37 -0
- package/hel_dist/favicon.ico +0 -0
- package/hel_dist/hel-meta.json +85 -0
- package/hel_dist/img/logo.82b9c7a5.png +0 -0
- package/hel_dist/index.html +1 -0
- package/hel_dist/js/app~493df0b3.f16034ff.js +16 -0
- package/hel_dist/js/app~493df0b3.f16034ff.js.map +1 -0
- package/hel_dist/js/chunk-e3b20906.e04b1c48.js +2 -0
- package/hel_dist/js/chunk-e3b20906.e04b1c48.js.map +1 -0
- package/hel_proxy/entry.js +37 -0
- package/hel_proxy_es/entry.js +28 -0
- package/package.json +87 -6
- package/scripts/check.js +13 -0
- package/scripts/meta.js +21 -0
- package/scripts/prepublishOnly.js +26 -0
- package/src/assets/logo.png +0 -0
- package/src/components/App.vue +32 -0
- package/src/components/HelloWorld.vue +37 -0
- package/src/components/TierRanking/index.vue +1012 -0
- package/src/components/TierRanking/ranking.css +650 -0
- package/src/components/TierRanking/source/ranking.css +657 -0
- package/src/components/TierRanking/source/ranking.html +1532 -0
- package/src/components/index.js +16 -0
- package/src/configs/subApp.js +9 -0
- package/src/entrance/libProperties.js +10 -0
- package/src/entrance/libTypes.ts +31 -0
- package/src/loadApp.js +20 -0
- package/src/main.js +25 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('hel-lib-proxy')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'hel-lib-proxy'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["comps-vue2"] = {}, global.helLibProxy));
|
|
5
|
+
})(this, (function (exports, helLibProxy) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
|--------------------------------------------------------------------------
|
|
9
|
+
|
|
|
10
|
+
| 对应 package.json/appGroupName
|
|
11
|
+
|
|
|
12
|
+
|--------------------------------------------------------------------------
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const LIB_NAME = 'comps-vue2';
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
|--------------------------------------------------------------------------
|
|
19
|
+
|
|
|
20
|
+
| 组件类型导出文件,同时也作为 rollup 的打包入口文件,因只提供类型,rollup 打包后是一个
|
|
21
|
+
| 仅包含 hel-lib-proxy 的空壳文件,对模块使用方的包体构建大小无影响
|
|
22
|
+
| 模块使用方 通过 npm i xxx-lib 后,只要在头文件处执行过 preFetchLib
|
|
23
|
+
| 则整个项目项使用本地模块一样载入提供方的组件,并可以点击到 node_modules 查看源码
|
|
24
|
+
|
|
|
25
|
+
|--------------------------------------------------------------------------
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* 将提供给用户的lib暴露出去(同时也暴露了类型)
|
|
29
|
+
*/
|
|
30
|
+
var dtlib = helLibProxy.exposeLib(LIB_NAME);
|
|
31
|
+
|
|
32
|
+
exports["default"] = dtlib;
|
|
33
|
+
exports.dtlib = dtlib;
|
|
34
|
+
|
|
35
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
36
|
+
|
|
37
|
+
}));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { exposeLib } from 'hel-lib-proxy';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
|--------------------------------------------------------------------------
|
|
5
|
+
|
|
|
6
|
+
| 对应 package.json/appGroupName
|
|
7
|
+
|
|
|
8
|
+
|--------------------------------------------------------------------------
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const LIB_NAME = 'comps-vue2';
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
|--------------------------------------------------------------------------
|
|
15
|
+
|
|
|
16
|
+
| 组件类型导出文件,同时也作为 rollup 的打包入口文件,因只提供类型,rollup 打包后是一个
|
|
17
|
+
| 仅包含 hel-lib-proxy 的空壳文件,对模块使用方的包体构建大小无影响
|
|
18
|
+
| 模块使用方 通过 npm i xxx-lib 后,只要在头文件处执行过 preFetchLib
|
|
19
|
+
| 则整个项目项使用本地模块一样载入提供方的组件,并可以点击到 node_modules 查看源码
|
|
20
|
+
|
|
|
21
|
+
|--------------------------------------------------------------------------
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* 将提供给用户的lib暴露出去(同时也暴露了类型)
|
|
25
|
+
*/
|
|
26
|
+
var dtlib = exposeLib(LIB_NAME);
|
|
27
|
+
|
|
28
|
+
export { dtlib as default, dtlib };
|
package/package.json
CHANGED
|
@@ -1,6 +1,87 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@melt-js/comps-vue2",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@melt-js/comps-vue2",
|
|
3
|
+
"appGroupName": "comps-vue2",
|
|
4
|
+
"main": "hel_proxy/entry.js",
|
|
5
|
+
"module": "hel_proxy_es/entry.js",
|
|
6
|
+
"types": "src/entrance/libTypes.ts",
|
|
7
|
+
"unpkg": "hel_dist/index.html",
|
|
8
|
+
"version": "2026.11.5",
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public",
|
|
11
|
+
"registry": "https://registry.npmjs.org"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"hel_dist",
|
|
15
|
+
"hel_proxy",
|
|
16
|
+
"hel_proxy_es",
|
|
17
|
+
"scripts",
|
|
18
|
+
"README.md",
|
|
19
|
+
"src"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"start": "pnpm run start:App",
|
|
23
|
+
"start:App": "cross-env PORT=20040 VUE_APP_COMP=App NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve",
|
|
24
|
+
"start:Hello": "cross-env PORT=20040 VUE_APP_COMP=HelloWorld NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve",
|
|
25
|
+
"start:Ranking": "cross-env PORT=20040 VUE_APP_COMP=TierRanking NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve",
|
|
26
|
+
"build": "pnpm run check_name && pnpm run build_dist && pnpm run build_meta && pnpm run build_proxy",
|
|
27
|
+
"build_dist": "cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build",
|
|
28
|
+
"check_name": "node ./scripts/check.js",
|
|
29
|
+
"build_proxy": "pnpm run build_proxy_umd && pnpm run build_proxy_es && shx cp ./hel_proxy/entry.js ./hel_dist",
|
|
30
|
+
"build_proxy_umd": "rollup -c",
|
|
31
|
+
"build_proxy_es": "cross-env BUILD_ENV=es rollup -c",
|
|
32
|
+
"build_cust": "pnpm run set_home_page \"pnpm run build && pnpm run build_meta\"",
|
|
33
|
+
"set_home_page": "cross-env-shell HEL_APP_HOME_PAGE=http://127.0.0.1:20040",
|
|
34
|
+
"build_meta": "node scripts/meta.js",
|
|
35
|
+
"lint": "vue-cli-service lint",
|
|
36
|
+
"prepublishOnly": "node ./scripts/prepublishOnly.js",
|
|
37
|
+
"publish:stage": "pnpm run build && npx -y npm@11 stage publish"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"core-js": "3.51.0",
|
|
41
|
+
"hel-iso": "4.4.0",
|
|
42
|
+
"hel-lib-proxy": "4.12.3",
|
|
43
|
+
"vue": "2.7.16"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"core-js": "3.51.0",
|
|
47
|
+
"hel-lib-proxy": "4.12.3",
|
|
48
|
+
"vue": "2.7.16"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@vue/cli-plugin-babel": "4.5.19",
|
|
52
|
+
"@vue/cli-plugin-eslint": "4.5.19",
|
|
53
|
+
"@vue/cli-service": "4.5.19",
|
|
54
|
+
"babel-eslint": "10.1.0",
|
|
55
|
+
"chalk": "2.4.2",
|
|
56
|
+
"cross-env": "7.0.3",
|
|
57
|
+
"eslint": "6.8.0",
|
|
58
|
+
"eslint-plugin-vue": "6.2.2",
|
|
59
|
+
"hel-dev-utils": "4.3.23",
|
|
60
|
+
"rollup": "2.80.0",
|
|
61
|
+
"rollup-plugin-terser": "7.0.2",
|
|
62
|
+
"rollup-plugin-typescript": "1.0.1",
|
|
63
|
+
"shx": "0.4.0",
|
|
64
|
+
"typescript": "4.8.4",
|
|
65
|
+
"vue-template-compiler": "2.7.16",
|
|
66
|
+
"webpack": "4.47.0"
|
|
67
|
+
},
|
|
68
|
+
"eslintConfig": {
|
|
69
|
+
"root": true,
|
|
70
|
+
"env": {
|
|
71
|
+
"node": true
|
|
72
|
+
},
|
|
73
|
+
"extends": [
|
|
74
|
+
"plugin:vue/essential",
|
|
75
|
+
"eslint:recommended"
|
|
76
|
+
],
|
|
77
|
+
"parserOptions": {
|
|
78
|
+
"parser": "babel-eslint"
|
|
79
|
+
},
|
|
80
|
+
"rules": {}
|
|
81
|
+
},
|
|
82
|
+
"browserslist": [
|
|
83
|
+
"> 1%",
|
|
84
|
+
"last 2 versions",
|
|
85
|
+
"not dead"
|
|
86
|
+
]
|
|
87
|
+
}
|
package/scripts/check.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|--------------------------------------------------------------------------
|
|
3
|
+
|
|
|
4
|
+
| 此脚本在流水线上会被触发,用于校验组名是否和应用里的组名保持一致
|
|
5
|
+
|
|
|
6
|
+
|--------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const helDevUtils = require('hel-dev-utils');
|
|
10
|
+
const pkg = require('../package.json');
|
|
11
|
+
|
|
12
|
+
const fileFullPath = path.join(__dirname, '../src/configs/subApp');
|
|
13
|
+
helDevUtils.check(pkg, { fileFullPath, checkEnv: false });
|
package/scripts/meta.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|--------------------------------------------------------------------------
|
|
3
|
+
|
|
|
4
|
+
| 生成meta
|
|
5
|
+
|
|
|
6
|
+
|--------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
const process = require('process');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const helDevUtils = require('hel-dev-utils');
|
|
11
|
+
const packageJson = require('../package.json');
|
|
12
|
+
const appInfo = require('../appInfo');
|
|
13
|
+
|
|
14
|
+
helDevUtils.extractHelMetaJson({
|
|
15
|
+
appInfo,
|
|
16
|
+
buildDirFullPath: path.join(__dirname, '../hel_dist'),
|
|
17
|
+
packageJson,
|
|
18
|
+
}).catch(err => {
|
|
19
|
+
console.error(err);
|
|
20
|
+
process.exit(-1);
|
|
21
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|--------------------------------------------------------------------------
|
|
3
|
+
| npm publush 前检查根目录下 package.json 的版本号是否和 hel_dist/hel-meta.json 一致
|
|
4
|
+
|--------------------------------------------------------------------------
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const chalk = require('chalk');
|
|
8
|
+
const pkg = require('../package.json');
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const helDistPath = path.resolve(__dirname, '../hel_dist/hel-meta.json');
|
|
12
|
+
const existHelMeata = fs.existsSync(helDistPath);
|
|
13
|
+
|
|
14
|
+
// 检查是否执行npm run build 打包命令
|
|
15
|
+
if (!existHelMeata) {
|
|
16
|
+
console.log(chalk.red("Run the 'npm run build' command first.\n"));
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
const { app } = JSON.parse(fs.readFileSync(helDistPath, 'utf-8'));
|
|
20
|
+
// 检查根目录下 package.json 的版本号是否和 hel_dist/hel-meta.json 一致
|
|
21
|
+
if (app?.build_version !== pkg.version) {
|
|
22
|
+
console.log(
|
|
23
|
+
chalk.red('The package.json version number and the hel_dist/hel-meta.json version number must be the same.\n')
|
|
24
|
+
);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="app">
|
|
3
|
+
<img alt="Vue logo" src="../assets/logo.png" />
|
|
4
|
+
<h2>name: {{name}}</h2>
|
|
5
|
+
<HelloWorld msg="Welcome to view project hel-tpl-remote-vue-comp ( from unpkg deploy )" />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import HelloWorld from "./HelloWorld.vue";
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: "App",
|
|
14
|
+
components: {
|
|
15
|
+
HelloWorld,
|
|
16
|
+
},
|
|
17
|
+
props: {
|
|
18
|
+
name: String,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<style scoped>
|
|
24
|
+
#app {
|
|
25
|
+
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
26
|
+
-webkit-font-smoothing: antialiased;
|
|
27
|
+
-moz-osx-font-smoothing: grayscale;
|
|
28
|
+
text-align: center;
|
|
29
|
+
color: #2c3e50;
|
|
30
|
+
margin-top: 60px;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="hello">
|
|
3
|
+
<hr />
|
|
4
|
+
<h1>{{ msg }}</h1>
|
|
5
|
+
<h2>I am a remote vue compoent8888</h2>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: "HelloWorld",
|
|
13
|
+
components: {
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
msg: String,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
22
|
+
<style scoped>
|
|
23
|
+
h3 {
|
|
24
|
+
margin: 40px 0 0;
|
|
25
|
+
}
|
|
26
|
+
ul {
|
|
27
|
+
list-style-type: none;
|
|
28
|
+
padding: 0;
|
|
29
|
+
}
|
|
30
|
+
li {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
margin: 0 10px;
|
|
33
|
+
}
|
|
34
|
+
a {
|
|
35
|
+
color: #42b983;
|
|
36
|
+
}
|
|
37
|
+
</style>
|