@wiajs/core 1.2.2 → 1.2.3
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/.oxfmtrc.jsonc +47 -0
- package/.oxlintrc.json +78 -0
- package/dist/core.cjs +306 -12
- package/dist/core.js +726 -11
- package/dist/core.min.js +11 -5
- package/dist/core.mjs +306 -13
- package/dist/jsx-runtime.js +127 -105
- package/package.json +27 -27
- package/.eslintignore +0 -5
- package/.eslintrc.js +0 -121
- package/.prettierignore +0 -24
- package/prettier.config.js +0 -13
package/package.json
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wiajs/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "wia app core package",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"core",
|
|
7
|
+
"wia"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://www.wia.pub/core",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/wiajs/core/issues"
|
|
12
|
+
},
|
|
13
|
+
"license": "ELv2",
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "Sibyl Yu",
|
|
16
|
+
"email": "sibyl@wia.pub"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/wiajs/wia.git"
|
|
21
|
+
},
|
|
5
22
|
"main": "./dist/core.cjs",
|
|
6
23
|
"module": "./dist/core.mjs",
|
|
7
24
|
"types": "./types/core.d.ts",
|
|
8
|
-
|
|
9
|
-
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
10
27
|
"types": "./types/core.d.ts",
|
|
11
28
|
"require": "./dist/core.cjs",
|
|
12
29
|
"import": "./dist/core.mjs",
|
|
13
30
|
"default": "./dist/core.mjs"
|
|
14
31
|
},
|
|
15
|
-
"./jsx-runtime":
|
|
16
|
-
"./jsx-dev-runtime": "./dist/jsx-runtime.js",
|
|
32
|
+
"./jsx-runtime": "./dist/jsx-runtime.js",
|
|
33
|
+
"./jsx-dev-runtime": "./dist/jsx-runtime.js",
|
|
17
34
|
"./util/*": [
|
|
18
35
|
"./util/*.js",
|
|
19
36
|
"./util/*.d.ts"
|
|
20
|
-
]
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
21
41
|
},
|
|
22
42
|
"scripts": {
|
|
23
43
|
"build": "cross-env NODE_ENV=production gulp build",
|
|
24
44
|
"build-dev": "cross-env NODE_ENV=development gulp build",
|
|
25
45
|
"dev": "cross-env NODE_ENV=development gulp cjs",
|
|
26
|
-
"dev:umd": "cross-env NODE_ENV=development gulp umd",
|
|
27
46
|
"dev:esm": "cross-env NODE_ENV=development gulp esm",
|
|
47
|
+
"dev:umd": "cross-env NODE_ENV=development gulp umd",
|
|
28
48
|
"release": "bash release.sh"
|
|
29
49
|
},
|
|
30
|
-
"repository": {
|
|
31
|
-
"type": "git",
|
|
32
|
-
"url": "git+https://github.com/wiajs/wia.git"
|
|
33
|
-
},
|
|
34
|
-
"keywords": [
|
|
35
|
-
"wia",
|
|
36
|
-
"core"
|
|
37
|
-
],
|
|
38
|
-
"author": {
|
|
39
|
-
"name": "Sibyl Yu",
|
|
40
|
-
"email": "sibyl@wia.pub"
|
|
41
|
-
},
|
|
42
|
-
"license": "ELv2",
|
|
43
|
-
"bugs": {
|
|
44
|
-
"url": "https://github.com/wiajs/core/issues"
|
|
45
|
-
},
|
|
46
|
-
"homepage": "https://www.wia.pub/core",
|
|
47
|
-
"publishConfig": {
|
|
48
|
-
"access": "public"
|
|
49
|
-
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@rollup/plugin-babel": "^6.0.3",
|
|
52
52
|
"@rollup/plugin-commonjs": "^25.0.1",
|
package/.eslintrc.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
const rules = {
|
|
2
|
-
// Disable for console/alert
|
|
3
|
-
// 0 关闭 1 警告 2 报错 https://eslint.org/docs/rules/ 中文网址:http://eslint.cn/docs/rules/
|
|
4
|
-
// "arrow-parens": [2, "as-needed"],
|
|
5
|
-
'arrow-parens': [2, 'as-needed', {requireForBlockBody: false}],
|
|
6
|
-
'arrow-body-style': [2, 'as-needed'],
|
|
7
|
-
'global-require': 0,
|
|
8
|
-
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
9
|
-
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
10
|
-
quotes: [1, 'single'],
|
|
11
|
-
'no-alert': 0,
|
|
12
|
-
'no-trailing-spaces': 0,
|
|
13
|
-
'nonblock-statement-body-position': 0, // [2, "beside"], // if else 强制单行
|
|
14
|
-
'block-spacing': 0, // 对象空格
|
|
15
|
-
'function-paren-newline': 0, // 函数参数换行
|
|
16
|
-
'linebreak-style': 0,
|
|
17
|
-
'lines-between-class-members': 0,
|
|
18
|
-
'class-methods-use-this': 0,
|
|
19
|
-
'import/no-extraneous-dependencies': 0,
|
|
20
|
-
indent: [2, 2, {SwitchCase: 1}],
|
|
21
|
-
'object-curly-spacing': 0,
|
|
22
|
-
'no-plusplus': 0,
|
|
23
|
-
'no-multi-spaces': 0,
|
|
24
|
-
'no-param-reassign': ['warn', {props: false}],
|
|
25
|
-
'no-use-before-define': [2, {functions: false, classes: true}],
|
|
26
|
-
'no-unused-expressions': ['error', {allowShortCircuit: true}],
|
|
27
|
-
'no-underscore-dangle': 0,
|
|
28
|
-
'no-unused-vars': [1, {vars: 'local', args: 'after-used'}],
|
|
29
|
-
'no-cond-assign': ['error', 'except-parens'],
|
|
30
|
-
'no-return-assign': [2, 'except-parens'],
|
|
31
|
-
'no-await-in-loop': 0,
|
|
32
|
-
'import/prefer-default-export': 0,
|
|
33
|
-
'operator-linebreak': 0,
|
|
34
|
-
'generator-star-spacing': 0,
|
|
35
|
-
// if while function 后面的{必须与if在同一行,java风格。
|
|
36
|
-
// "brace-style": [2, "1tbs", { "allowSingleLine": true }]
|
|
37
|
-
|
|
38
|
-
// 数组和对象键值对最后一个逗号, never 参数:不能带末尾的逗号, always参数:必须带末尾的逗号,
|
|
39
|
-
// always-multiline:多行模式必须带逗号,单行模式不能带逗号
|
|
40
|
-
'comma-dangle': [2, 'only-multiline'],
|
|
41
|
-
// 控制逗号前后的空格
|
|
42
|
-
'comma-spacing': [2, {before: false, after: true}],
|
|
43
|
-
// 控制逗号在行尾出现还是在行首出现
|
|
44
|
-
// http://eslint.org/docs/rules/comma-style
|
|
45
|
-
'comma-style': [0, 'last'],
|
|
46
|
-
'max-len': [2, 120, 2],
|
|
47
|
-
curly: [0, 'multi'], // 单行无需大括号
|
|
48
|
-
// 强制方法必须返回值,TypeScript强类型,不配置
|
|
49
|
-
'consistent-return': 0,
|
|
50
|
-
'object-curly-newline': 0,
|
|
51
|
-
semi: 0, // 分号检查
|
|
52
|
-
'space-before-function-paren': 0, // ["error", "never"]
|
|
53
|
-
'func-names': ['error', 'never'],
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
module.exports = {
|
|
57
|
-
root: true, // 停止父目录查找配置
|
|
58
|
-
parser: '@babel/eslint-parser', // "typescript-eslint-parser", "babel-eslint",
|
|
59
|
-
env: {
|
|
60
|
-
es6: true,
|
|
61
|
-
es2017: true,
|
|
62
|
-
es2020: true,
|
|
63
|
-
es2021: true,
|
|
64
|
-
browser: true, // 浏览器环境中的全局变量
|
|
65
|
-
worker: true,
|
|
66
|
-
node: true,
|
|
67
|
-
commonjs: true,
|
|
68
|
-
mongo: true,
|
|
69
|
-
jest: true,
|
|
70
|
-
jquery: true,
|
|
71
|
-
},
|
|
72
|
-
globals: {
|
|
73
|
-
XMLHttpRequest: true,
|
|
74
|
-
Blob: true,
|
|
75
|
-
Document: true,
|
|
76
|
-
FormData: true,
|
|
77
|
-
Dom: true,
|
|
78
|
-
$: true,
|
|
79
|
-
document: true,
|
|
80
|
-
window: true,
|
|
81
|
-
},
|
|
82
|
-
parserOptions: {
|
|
83
|
-
ecmaVersion: 'latest',
|
|
84
|
-
sourceType: 'module',
|
|
85
|
-
ecmaFeatures: {
|
|
86
|
-
jsx: true,
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
plugins: [
|
|
90
|
-
// 插件,需安装好,配置时省略 eslint-plugin-
|
|
91
|
-
// babel,
|
|
92
|
-
// react,
|
|
93
|
-
],
|
|
94
|
-
extends: [
|
|
95
|
-
// 继承规则 // 'airbnb', 'eslint:recommended'
|
|
96
|
-
'plugin:react/recommended',
|
|
97
|
-
'airbnb',
|
|
98
|
-
'plugin:prettier/recommended',
|
|
99
|
-
'plugin:import/recommended',
|
|
100
|
-
],
|
|
101
|
-
rules: {
|
|
102
|
-
...rules,
|
|
103
|
-
},
|
|
104
|
-
overrides: [
|
|
105
|
-
{
|
|
106
|
-
files: ['src/**/*.js'],
|
|
107
|
-
extends: [
|
|
108
|
-
'plugin:react/recommended',
|
|
109
|
-
'airbnb-base',
|
|
110
|
-
'plugin:prettier/recommended',
|
|
111
|
-
'plugin:import/recommended'
|
|
112
|
-
],
|
|
113
|
-
plugins: ['react'],
|
|
114
|
-
rules: {
|
|
115
|
-
...rules,
|
|
116
|
-
'react/no-unknown-property': ['off'],
|
|
117
|
-
'react/jsx-key': ['off'],
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
};
|
package/.prettierignore
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.*
|
|
2
|
-
*.ejs
|
|
3
|
-
*.ico
|
|
4
|
-
*.map
|
|
5
|
-
*.png
|
|
6
|
-
*.svg
|
|
7
|
-
*.xml
|
|
8
|
-
|
|
9
|
-
.eslintignore
|
|
10
|
-
.eslintrc
|
|
11
|
-
.eslintrc.js
|
|
12
|
-
.prettierignore
|
|
13
|
-
.prettierrc
|
|
14
|
-
prettier.config.js
|
|
15
|
-
wiamap.yml
|
|
16
|
-
|
|
17
|
-
package.json
|
|
18
|
-
package-lock.json
|
|
19
|
-
yarn.lock
|
|
20
|
-
|
|
21
|
-
node_modules
|
|
22
|
-
dist
|
|
23
|
-
doc
|
|
24
|
-
.vscode
|
package/prettier.config.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
tabWidth: 2, // 使用 2 个空格缩进
|
|
3
|
-
useTabs: false, // 不使用缩进符,而使用空格
|
|
4
|
-
semi: true, // 行尾需要有分号
|
|
5
|
-
singleQuote: true, // 使用单引号
|
|
6
|
-
bracketSpacing: false, // 大括号内的首尾需要空格
|
|
7
|
-
trailingComma: 'es5', // 末尾是否需要逗号
|
|
8
|
-
jsxBracketSameLine: true, // jsx 标签的反尖括号不换行
|
|
9
|
-
arrowParens: 'avoid', // 尽可能省略箭头函数参数括号。 示例:x => x
|
|
10
|
-
printWidth: 100, // 代码换行长度
|
|
11
|
-
endOfLine: 'auto',
|
|
12
|
-
// jsxSingleQuote: false, // jsx 使用双引号
|
|
13
|
-
};
|