antd-management-fast-develop 1.0.2

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/package.json ADDED
@@ -0,0 +1,98 @@
1
+ {
2
+ "name": "antd-management-fast-develop",
3
+ "version": "1.0.2",
4
+ "description": "",
5
+ "license": "ISC",
6
+ "author": "",
7
+ "main": "src/index.js",
8
+ "directories": {
9
+ "src": "src"
10
+ },
11
+ "files": [
12
+ "src/"
13
+ ],
14
+ "scripts": {
15
+ "precommit": "npm run z:lint:staged:quiet",
16
+ "publish:npm": "npm publish --registry https://registry.npmjs.org/",
17
+ "prez:documentation:generate": "npx rimraf ./docs && npm run z:documentation:lint",
18
+ "z:documentation:generate": "npx documentation build src/** -f html --github -o docs",
19
+ "z:documentation:lint": "npx documentation lint src/**",
20
+ "z:lint:file:all": "npm run z:lint:script:all && npm run z:lint:style:all",
21
+ "z:lint:file:all:fix": "npm run z:lint:script:all:fix && npm run z:lint:style:all:fix",
22
+ "z:lint:file:change": "npm run z:lint:script:change && npm run z:lint:style:all",
23
+ "z:lint:file:change:fix": "npm run z:lint:script:change:fix && npm run z:lint:style:all:fix",
24
+ "z:lint:script:all": "npx eslint --ext .js,.jsx,.ts,.tsx ./src",
25
+ "z:lint:script:all:fix": "npx eslint --fix --ext .js,.jsx,.ts,.tsx ./src",
26
+ "postz:lint:script:all:fix": "npm run z:prettier:format:all",
27
+ "z:lint:script:change": "npx eslint --cache --ext .js,.jsx,.ts,.tsx ./src",
28
+ "z:lint:script:change:fix": "npx eslint --fix --cache --ext .js,.jsx,.ts,.tsx ./src",
29
+ "postz:lint:script:change:fix": "npm run z:prettier:format:change",
30
+ "z:lint:staged": "npx lint-staged",
31
+ "z:lint:staged:quiet": "npx lint-staged --quiet",
32
+ "z:lint:style:all": "npx stylelint --allow-empty-input \"./src/**/*.{css,scss,less}\"",
33
+ "z:lint:style:all:fix": "npx stylelint --allow-empty-input --fix \"./src/**/*.{css,scss,less}\"",
34
+ "postz:lint:style:all:fix": "npm run z:prettier:format:all",
35
+ "z:lint:style:change": "npx stylelint --allow-empty-input --cache \"./src/**/*.{css,scss,less}\"",
36
+ "z:lint:style:change:fix": "npx stylelint --allow-empty-input --cache --fix \"./src/**/*.{css,scss,less}\"",
37
+ "postz:lint:style:change:fix": "npm run z:prettier:format:change",
38
+ "z:prettier:format:all": "npx prettier --write .",
39
+ "z:prettier:format:change": "npx prettier --cache --write .",
40
+ "z:prettier:package.json": "npx prettier --write ./package.json",
41
+ "z:test": "cross-env NODE_ENV=test jest",
42
+ "z:tsc:build": "echo show tsc version and create declaration file && tsc -v && tsc -p ./tsconfig.types.json && echo declaration file generate complete"
43
+ },
44
+ "dependencies": {},
45
+ "devDependencies": {
46
+ "@babel/core": "^7.21.0",
47
+ "@babel/eslint-parser": "^7.19.1",
48
+ "@babel/plugin-external-helpers": "^7.18.6",
49
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
50
+ "@babel/plugin-proposal-decorators": "^7.21.0",
51
+ "@babel/plugin-transform-runtime": "^7.21.0",
52
+ "@babel/preset-env": "^7.20.2",
53
+ "@babel/preset-react": "^7.18.6",
54
+ "@babel/runtime": "^7.21.0",
55
+ "@commitlint/cli": "^17.4.4",
56
+ "@commitlint/config-conventional": "^17.4.4",
57
+ "@commitlint/config-lerna-scopes": "^17.4.2",
58
+ "@commitlint/cz-commitlint": "^17.4.4",
59
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
60
+ "@types/jest": "^29.4.0",
61
+ "@types/node": "^18.15.0",
62
+ "@typescript-eslint/parser": "^5.54.1",
63
+ "@umijs/max": "^4.0.57",
64
+ "commitizen": "^4.3.0",
65
+ "conventional-changelog-conventionalcommits": "^5.0.0",
66
+ "cross-env": "^7.0.3",
67
+ "documentation": "^14.0.1",
68
+ "easy-soft-develop": "^2.0.172",
69
+ "eslint": "^8.35.0",
70
+ "eslint-config-airbnb": "^19.0.4",
71
+ "eslint-config-airbnb-typescript": "^17.0.0",
72
+ "eslint-config-prettier": "^8.7.0",
73
+ "eslint-formatter-pretty": "^4.1.0",
74
+ "eslint-import-resolver-typescript": "^3.5.3",
75
+ "eslint-plugin-eslint-comments": "^3.2.0",
76
+ "eslint-plugin-import": "^2.27.5",
77
+ "eslint-plugin-jest": "^27.2.1",
78
+ "eslint-plugin-jsx-a11y": "^6.7.1",
79
+ "eslint-plugin-prettier": "^4.2.1",
80
+ "eslint-plugin-promise": "^6.1.1",
81
+ "eslint-plugin-react": "^7.32.2",
82
+ "eslint-plugin-react-hooks": "^4.6.0",
83
+ "eslint-plugin-simple-import-sort": "^10.0.0",
84
+ "eslint-plugin-unicorn": "^46.0.0",
85
+ "husky": "^8.0.3",
86
+ "jest": "^29.5.0",
87
+ "lint-staged": "^13.1.2",
88
+ "prettier": "^2.8.4",
89
+ "prettier-plugin-organize-imports": "^3.2.2",
90
+ "prettier-plugin-packagejson": "^2.4.3",
91
+ "react": "^18.2.0",
92
+ "react-dnd": "^16.0.1",
93
+ "rimraf": "^4.4.0",
94
+ "stylelint": "^15.2.0",
95
+ "stylelint-config-prettier": "^9.0.5",
96
+ "stylelint-config-standard": "^30.0.1"
97
+ }
98
+ }
@@ -0,0 +1,53 @@
1
+ export function checkDevelopment() {
2
+ return process.env.NODE_ENV === 'development';
3
+ }
4
+
5
+ export function buildConfig({ packageJson: packageImport, config = {} }) {
6
+ const deps = packageImport.dependencies;
7
+
8
+ let mfsu = {};
9
+ const shared = {};
10
+
11
+ if (deps) {
12
+ if (deps['react']) {
13
+ shared.react = {
14
+ singleton: true,
15
+ requiredVersion: deps['react'],
16
+ };
17
+ }
18
+
19
+ if (deps['react-dom']) {
20
+ shared['react-dom'] = {
21
+ singleton: true,
22
+ requiredVersion: deps['react-dom'],
23
+ };
24
+ }
25
+
26
+ mfsu.shared = shared;
27
+ }
28
+
29
+ const mergeConfig = {
30
+ mfsu,
31
+ hash: true,
32
+ antd: {},
33
+ access: {},
34
+ model: {},
35
+ initialState: {},
36
+ request: {},
37
+ dva: {},
38
+ history: { type: 'hash' },
39
+ locale: {
40
+ // 默认使用 src/locales/zh-CN.ts 作为多语言文件
41
+ default: 'zh-CN',
42
+ antd: true,
43
+ // default true, when it is true, will use `navigator.language` overwrite default
44
+ baseNavigator: true,
45
+ },
46
+ layout: {},
47
+ ...config,
48
+ };
49
+
50
+ console.log(mergeConfig);
51
+
52
+ return mergeConfig;
53
+ }
package/src/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './configAssist';
package/src/index.less ADDED
@@ -0,0 +1,3 @@
1
+ #test {
2
+ font-size: inherit;
3
+ }