framework-for-react 1.0.5 → 1.0.7
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/babel.config.js +29 -7
- package/package.json +63 -64
package/babel.config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const config = {
|
|
2
2
|
assumptions: {
|
|
3
3
|
privateFieldsAsProperties: true,
|
|
4
4
|
setPublicClassFields: true,
|
|
@@ -8,15 +8,37 @@ module.exports = {
|
|
|
8
8
|
'@babel/plugin-transform-arrow-functions',
|
|
9
9
|
['@babel/plugin-proposal-decorators', { legacy: true }],
|
|
10
10
|
['@babel/plugin-proposal-private-methods' /*, { loose: true }*/],
|
|
11
|
-
['@babel/plugin-
|
|
12
|
-
|
|
11
|
+
['@babel/plugin-transform-class-properties' /*, { loose: true }*/],
|
|
12
|
+
],
|
|
13
|
+
compact: false,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
const fs = require("fs");
|
|
18
|
+
const path = require('path');
|
|
19
|
+
|
|
20
|
+
function getPackageVersion (module) {
|
|
21
|
+
const pkgPath = path.join(__dirname + '/../' + module + '/package.json');
|
|
22
|
+
const pkgData = JSON.parse(fs.readFileSync(pkgPath));
|
|
23
|
+
return pkgData?.version;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
let antdVer = getPackageVersion('antd');
|
|
28
|
+
if (antdVer[0] < '5') {
|
|
29
|
+
console.log('antd use less than 5.x')
|
|
30
|
+
config.plugins.push([
|
|
13
31
|
'babel-plugin-import',
|
|
14
32
|
{
|
|
15
33
|
libraryName: 'antd',
|
|
16
34
|
libraryDirectory: 'lib',
|
|
17
35
|
style: 'css',
|
|
18
36
|
},
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
37
|
+
])
|
|
38
|
+
}
|
|
39
|
+
} catch (e) {
|
|
40
|
+
console.log(e)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
module.exports = config
|
package/package.json
CHANGED
|
@@ -1,64 +1,63 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "framework-for-react",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "framework for react18",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"index.js",
|
|
11
|
-
"babel.config.js"
|
|
12
|
-
],
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "https://gitee.com/sky_yz/framework-for-react.git"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"framework",
|
|
19
|
-
"react18",
|
|
20
|
-
"webpack5"
|
|
21
|
-
],
|
|
22
|
-
"author": "yzh",
|
|
23
|
-
"license": "ISC",
|
|
24
|
-
"dependencies": {
|
|
25
|
-
"@babel/core": "^7.
|
|
26
|
-
"@babel/plugin-proposal-
|
|
27
|
-
"@babel/plugin-
|
|
28
|
-
"@babel/plugin-syntax-
|
|
29
|
-
"@babel/plugin-
|
|
30
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
31
|
-
"@babel/
|
|
32
|
-
"@babel/preset-
|
|
33
|
-
"@babel/
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"babel-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"less": "^
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"postcss": "^8.
|
|
49
|
-
"
|
|
50
|
-
"react": "^
|
|
51
|
-
"react-
|
|
52
|
-
"react-
|
|
53
|
-
"react-
|
|
54
|
-
"
|
|
55
|
-
"redux": "^
|
|
56
|
-
"redux-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"webpack": "^
|
|
60
|
-
"webpack-
|
|
61
|
-
"webpack-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "framework-for-react",
|
|
3
|
+
"version": "1.0.7",
|
|
4
|
+
"description": "framework for react18",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"index.js",
|
|
11
|
+
"babel.config.js"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://gitee.com/sky_yz/framework-for-react.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"framework",
|
|
19
|
+
"react18",
|
|
20
|
+
"webpack5"
|
|
21
|
+
],
|
|
22
|
+
"author": "yzh",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@babel/core": "^7.29.0",
|
|
26
|
+
"@babel/plugin-proposal-decorators": "^7.29.0",
|
|
27
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
28
|
+
"@babel/plugin-syntax-jsx": "^7.28.6",
|
|
29
|
+
"@babel/plugin-transform-class-properties": "^7.28.6",
|
|
30
|
+
"@babel/plugin-transform-runtime": "^7.29.0",
|
|
31
|
+
"@babel/preset-env": "^7.29.0",
|
|
32
|
+
"@babel/preset-react": "^7.28.5",
|
|
33
|
+
"@babel/runtime": "^7.28.6",
|
|
34
|
+
"autoprefixer": "^10.4.24",
|
|
35
|
+
"axios": "^1.13.5",
|
|
36
|
+
"babel-loader": "^10.0.0",
|
|
37
|
+
"babel-plugin-import": "^1.13.8",
|
|
38
|
+
"classnames": "^2.5.1",
|
|
39
|
+
"copy-webpack-plugin": "^13.0.1",
|
|
40
|
+
"cross-env": "^10.1.0",
|
|
41
|
+
"css-loader": "^7.1.3",
|
|
42
|
+
"git-revision-webpack-plugin": "^5.0.0",
|
|
43
|
+
"html-webpack-plugin": "^5.6.6",
|
|
44
|
+
"less": "^4.5.1",
|
|
45
|
+
"less-loader": "^12.3.1",
|
|
46
|
+
"mini-css-extract-plugin": "^2.10.0",
|
|
47
|
+
"postcss": "^8.5.6",
|
|
48
|
+
"postcss-loader": "^8.2.0",
|
|
49
|
+
"react": "^19.2.4",
|
|
50
|
+
"react-dom": "^19.2.4",
|
|
51
|
+
"react-intl": "^8.1.3",
|
|
52
|
+
"react-redux": "^9.2.0",
|
|
53
|
+
"react-router-dom": "^7.13.0",
|
|
54
|
+
"redux": "^5.0.1",
|
|
55
|
+
"redux-logger": "^3.0.6",
|
|
56
|
+
"redux-thunk": "^3.1.0",
|
|
57
|
+
"style-loader": "^4.0.0",
|
|
58
|
+
"webpack": "^5.105.1",
|
|
59
|
+
"webpack-cli": "^6.0.1",
|
|
60
|
+
"webpack-dev-server": "^5.2.3",
|
|
61
|
+
"webpack-merge": "^6.0.1"
|
|
62
|
+
}
|
|
63
|
+
}
|