chore: remove esm deps and unused files

This commit is contained in:
Justineo
2023-02-02 00:04:27 +08:00
parent 5f7f9c0d4c
commit f554c89c58
10 changed files with 435 additions and 152 deletions

View File

@ -1,16 +1,16 @@
import fs from "fs";
import { resolve } from "path";
import commentMark from "comment-mark";
import { name, version } from "../package.json";
const fs = require("fs");
const { resolve } = require("path");
const commentMark = require("comment-mark");
const { name, version } = require("../package.json");
const { readFile, writeFile } = fs.promises;
const CDN_PREFIX = "https://cdn.jsdelivr.net/npm/";
const DEP_VERSIONS = {
"vue@3": "3.2.37",
"vue@2": "2.7.5",
echarts: "5.3.3",
"vue@3": "3.2.45",
"vue@2": "2.7.14",
echarts: "5.4.1",
[name]: version
};

View File

@ -1,6 +0,0 @@
{
"globals": {
"Vue": true,
"VueECharts": true
}
}

View File

@ -1,3 +0,0 @@
#app {
height: 400px;
}

View File

@ -1,3 +0,0 @@
<div id="app">
<v-chart autoresize :option="option"/>
</div>

View File

@ -1,55 +0,0 @@
Vue.component("v-chart", VueECharts);
new Vue({
el: "#app",
data() {
return {
option: {
textStyle: {
fontFamily: 'Inter, "Helvetica Neue", Arial, sans-serif'
},
title: {
text: "Traffic Sources",
left: "center"
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
orient: "vertical",
left: "left",
data: [
"Direct",
"Email",
"Ad Networks",
"Video Ads",
"Search Engines"
]
},
series: [
{
name: "Traffic Sources",
type: "pie",
radius: "55%",
center: ["50%", "60%"],
data: [
{ value: 335, name: "Direct" },
{ value: 310, name: "Email" },
{ value: 234, name: "Ad Networks" },
{ value: 135, name: "Video Ads" },
{ value: 1548, name: "Search Engines" }
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)"
}
}
}
]
}
};
}
});

View File

@ -1,54 +0,0 @@
Vue.createApp({
data() {
return {
option: {
textStyle: {
fontFamily: 'Inter, "Helvetica Neue", Arial, sans-serif'
},
title: {
text: "Traffic Sources",
left: "center"
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
orient: "vertical",
left: "left",
data: [
"Direct",
"Email",
"Ad Networks",
"Video Ads",
"Search Engines"
]
},
series: [
{
name: "Traffic Sources",
type: "pie",
radius: "55%",
center: ["50%", "60%"],
data: [
{ value: 335, name: "Direct" },
{ value: 310, name: "Email" },
{ value: 234, name: "Ad Networks" },
{ value: 135, name: "Video Ads" },
{ value: 1548, name: "Search Engines" }
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)"
}
}
}
]
}
};
}
})
.component("v-chart", VueECharts)
.mount("#app");