@jx3box/jx3box-common-ui 9.5.18 → 9.5.20
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/.eslintrc.js +42 -0
- package/babel.config.js +4 -3
- package/package.json +20 -31
- package/vue.config.js +24 -22
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// 停止在父级目录中寻找配置文件
|
|
3
|
+
root: true,
|
|
4
|
+
|
|
5
|
+
// 定义环境,防止因为使用 window 或 module 等全局变量报错
|
|
6
|
+
env: {
|
|
7
|
+
node: true,
|
|
8
|
+
browser: true,
|
|
9
|
+
es6: true,
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
// 关键配置:继承 Vue 的官方规则
|
|
13
|
+
// 这会自动设置 parser 为 'vue-eslint-parser',从而解决 "Unexpected token <"
|
|
14
|
+
extends: ["plugin:vue/essential", "eslint:recommended"],
|
|
15
|
+
|
|
16
|
+
// 解析器选项
|
|
17
|
+
parserOptions: {
|
|
18
|
+
// 这里指定 script 标签内的代码使用 babel 解析器
|
|
19
|
+
// 这解决了 "import is reserved" 和可选链等新语法报错
|
|
20
|
+
parser: "@babel/eslint-parser",
|
|
21
|
+
requireConfigFile: false,
|
|
22
|
+
|
|
23
|
+
// 允许使用 ES 模块 (import/export)
|
|
24
|
+
sourceType: "module",
|
|
25
|
+
|
|
26
|
+
// 支持最新的 JS 特性
|
|
27
|
+
ecmaVersion: 2020,
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// 自定义规则
|
|
31
|
+
rules: {
|
|
32
|
+
"no-console": "off",
|
|
33
|
+
"no-debugger": "off",
|
|
34
|
+
// 如果你有未使用的变量报错,可以暂时关掉
|
|
35
|
+
"no-unused-vars": "off",
|
|
36
|
+
"no-useless-escape": "off",
|
|
37
|
+
"vue/multi-word-component-names": "off",
|
|
38
|
+
"vue/no-mutating-props": "off",
|
|
39
|
+
"no-undef": "off",
|
|
40
|
+
"no-extra-boolean-cast": "off",
|
|
41
|
+
},
|
|
42
|
+
};
|
package/babel.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-common-ui",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.20",
|
|
4
4
|
"description": "JX3BOX UI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,28 +13,16 @@
|
|
|
13
13
|
"update": "npm --registry https://registry.npmjs.org install @jx3box/jx3box-common@latest @jx3box/jx3box-data@latest @jx3box/jx3box-comment-ui@latest @jx3box/jx3box-editor@latest",
|
|
14
14
|
"header": "vue-cli-service build --target lib --name newheader src/Header.vue && cp public/index.html dist/newheader.html"
|
|
15
15
|
},
|
|
16
|
-
"eslintConfig": {
|
|
17
|
-
"root": true,
|
|
18
|
-
"env": {
|
|
19
|
-
"node": true
|
|
20
|
-
},
|
|
21
|
-
"extends": [
|
|
22
|
-
"plugin:vue/essential"
|
|
23
|
-
],
|
|
24
|
-
"rules": {},
|
|
25
|
-
"parserOptions": {
|
|
26
|
-
"parser": "babel-eslint"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
16
|
"browserslist": [
|
|
30
17
|
"> 1%",
|
|
31
|
-
"last 2 versions"
|
|
18
|
+
"last 2 versions",
|
|
19
|
+
"not dead"
|
|
32
20
|
],
|
|
33
21
|
"dependencies": {
|
|
34
|
-
"@jx3box/jx3box-comment-ui": "^2.0.
|
|
35
|
-
"@jx3box/jx3box-common": "^8.7.
|
|
36
|
-
"@jx3box/jx3box-data": "^3.
|
|
37
|
-
"@jx3box/jx3box-editor": "^2.2.
|
|
22
|
+
"@jx3box/jx3box-comment-ui": "^2.0.9",
|
|
23
|
+
"@jx3box/jx3box-common": "^8.7.4",
|
|
24
|
+
"@jx3box/jx3box-data": "^3.9.2",
|
|
25
|
+
"@jx3box/jx3box-editor": "^2.2.43",
|
|
38
26
|
"@jx3box/reporter": "^0.0.4",
|
|
39
27
|
"axios": "^0.26.1",
|
|
40
28
|
"dayjs": "^1.11.0",
|
|
@@ -48,22 +36,23 @@
|
|
|
48
36
|
"vue": "^2.6.11"
|
|
49
37
|
},
|
|
50
38
|
"devDependencies": {
|
|
51
|
-
"@babel/
|
|
52
|
-
"@
|
|
53
|
-
"@vue/cli-plugin-
|
|
54
|
-
"@vue/cli-plugin-
|
|
55
|
-
"@vue/cli-
|
|
39
|
+
"@babel/core": "^7.12.16",
|
|
40
|
+
"@babel/eslint-parser": "^7.12.16",
|
|
41
|
+
"@vue/cli-plugin-babel": "~5.0.8",
|
|
42
|
+
"@vue/cli-plugin-eslint": "~5.0.8",
|
|
43
|
+
"@vue/cli-plugin-vuex": "~5.0.8",
|
|
44
|
+
"@vue/cli-service": "~5.0.8",
|
|
56
45
|
"babel-eslint": "^10.1.0",
|
|
57
|
-
"core-js": "^3.
|
|
46
|
+
"core-js": "^3.8.3",
|
|
58
47
|
"cross-env": "^7.0.3",
|
|
59
48
|
"csslab": "^4.0.3",
|
|
60
|
-
"eslint": "^
|
|
61
|
-
"eslint-plugin-vue": "^
|
|
62
|
-
"less": "^
|
|
63
|
-
"less-loader": "^
|
|
64
|
-
"style-resources-loader": "^1.
|
|
49
|
+
"eslint": "^7.32.0",
|
|
50
|
+
"eslint-plugin-vue": "^8.0.3",
|
|
51
|
+
"less": "^4.0.0",
|
|
52
|
+
"less-loader": "^8.0.0",
|
|
53
|
+
"style-resources-loader": "^1.4.1",
|
|
65
54
|
"vue-cli-plugin-element": "~1.0.1",
|
|
66
|
-
"vue-svg-inline-loader": "^1.
|
|
55
|
+
"vue-svg-inline-loader": "^2.1.0",
|
|
67
56
|
"vue-template-compiler": "^2.6.11",
|
|
68
57
|
"weixin-js-sdk": "^1.6.0"
|
|
69
58
|
},
|
package/vue.config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
require("events").EventEmitter.defaultMaxListeners = 2333;
|
|
1
2
|
const path = require("path");
|
|
2
3
|
const pkg = require("./package.json");
|
|
3
4
|
const { JX3BOX } = require("@jx3box/jx3box-common");
|
|
4
|
-
// const Setting = require("./setting.json");
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
7
|
//❤️ define path for static files ~
|
|
@@ -23,8 +23,10 @@ module.exports = {
|
|
|
23
23
|
//for lost
|
|
24
24
|
"/",
|
|
25
25
|
|
|
26
|
-
//❤️
|
|
26
|
+
//❤️ Proxy ~
|
|
27
27
|
devServer: {
|
|
28
|
+
// Webpack 5 (Dev Server 4) 废弃了 disableHostCheck,改用 allowedHosts
|
|
29
|
+
allowedHosts: "all",
|
|
28
30
|
proxy: {
|
|
29
31
|
"/api/vip": {
|
|
30
32
|
target: "https://pay.jx3box.com",
|
|
@@ -46,7 +48,6 @@ module.exports = {
|
|
|
46
48
|
},
|
|
47
49
|
"/api/cms": {
|
|
48
50
|
target: "https://cms.jx3box.com",
|
|
49
|
-
// target: process.env["DEV_SERVER"] == "true" ? "http://localhost:7100" : "https://cms.jx3box.com",
|
|
50
51
|
},
|
|
51
52
|
"/api/article": {
|
|
52
53
|
target: "https://next2.jx3box.com",
|
|
@@ -85,27 +86,29 @@ module.exports = {
|
|
|
85
86
|
},
|
|
86
87
|
},
|
|
87
88
|
},
|
|
88
|
-
|
|
89
|
+
client: {
|
|
90
|
+
overlay: {
|
|
91
|
+
warnings: false,
|
|
92
|
+
errors: false,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
configureWebpack: {
|
|
97
|
+
ignoreWarnings: [
|
|
98
|
+
// 使用正则匹配警告信息,匹配到的统统不显示
|
|
99
|
+
/Should not import the named export/,
|
|
100
|
+
// /export '.*' \(imported as '.*'\) was not found in/,
|
|
101
|
+
],
|
|
89
102
|
},
|
|
90
|
-
|
|
91
103
|
chainWebpack: (config) => {
|
|
92
|
-
//💘 html-webpack-plugin ~
|
|
93
|
-
// Multiple pages disable the block below
|
|
94
|
-
// config.plugin("html").tap(args => {
|
|
95
|
-
// args[0].meta = { //------设置SEO信息
|
|
96
|
-
// Keywords: Setting.keys,
|
|
97
|
-
// Description: Setting.desc
|
|
98
|
-
// };
|
|
99
|
-
// args[0].title = Setting.title + SEO.title; //------自动添加标题后缀
|
|
100
|
-
// return args;
|
|
101
|
-
// });
|
|
102
|
-
|
|
103
104
|
//💝 in-line small imgs ~
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
// Vue CLI 5 (Webpack 5) 修正写法:
|
|
106
|
+
// 不再使用 url-loader,而是修改 parser 配置
|
|
107
|
+
config.module.rule("images").set("parser", {
|
|
108
|
+
dataUrlCondition: {
|
|
109
|
+
maxSize: 10240, // 10kb
|
|
110
|
+
},
|
|
111
|
+
});
|
|
109
112
|
|
|
110
113
|
//💝 in-line svg imgs ~
|
|
111
114
|
config.module.rule("vue").use("vue-svg-inline-loader").loader("vue-svg-inline-loader");
|
|
@@ -116,7 +119,6 @@ module.exports = {
|
|
|
116
119
|
preload_styles.push(
|
|
117
120
|
path.resolve(__dirname, "./node_modules/csslab/base.less"),
|
|
118
121
|
path.resolve(__dirname, "./node_modules/@jx3box/jx3box-common/css/var.less")
|
|
119
|
-
// path.resolve(__dirname, './src/assets/css/var.less')
|
|
120
122
|
);
|
|
121
123
|
function addStyleResource(rule) {
|
|
122
124
|
rule.use("style-resource").loader("style-resources-loader").options({
|