cos-design 1.7.0 → 2.1.0

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 CHANGED
@@ -1,86 +1,105 @@
1
1
  {
2
2
  "name": "cos-design",
3
- "version": "1.7.0",
4
- "description": "cos-deisgn",
5
- "main": "lib/index.js",
6
- "typings": "lib/index.d.ts",
7
- "keywords": [
8
- "cos",
9
- "cos-design"
10
- ],
3
+ "version": "2.1.0",
4
+ "description": "A React component library built with Vite",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.cjs"
18
+ }
19
+ }
20
+ },
11
21
  "files": [
22
+ "dist",
12
23
  "LICENSE",
13
24
  "README.md",
14
- "dist/*",
15
- "lib/*"
25
+ "CHANGELOG.md"
16
26
  ],
17
- "repository": "git@github.com:jiaxiantao/cos-design.git",
18
- "author": "jiaxiantao <jiaxiantao@souche.com>",
19
- "license": "MIT",
20
- "scripts": {
21
- "start": "cross-env NODE_ENV=development webpack-dev-server --config webpack.config.js",
22
- "build": "cross-env NODE_ENV=production webpack --config webpack.config.js",
23
- "build:module": "cross-env NODE_ENV=production BUILD_MODE=module webpack --config webpack.config.js",
24
- "dev": "npm run start",
25
- "pub": "npm run build:module && yarn publish",
26
- "lint": "npm run lint:js && npm run lint:style && npm run lint:prettier",
27
- "lint-staged": "lint-staged",
28
- "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx",
29
- "lint:fix": "eslint --fix --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style",
30
- "lint:js": "eslint --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
31
- "lint:prettier": "check-prettier lint",
32
- "lint:style": "stylelint --fix \"src/**/*.less\" --syntax less",
33
- "prettier": "prettier -c --write \"**/*\""
27
+ "sideEffects": [
28
+ "**/*.css",
29
+ "**/*.less"
30
+ ],
31
+ "keywords": [
32
+ "cos",
33
+ "cos-design",
34
+ "react",
35
+ "component-library",
36
+ "vite",
37
+ "typescript"
38
+ ],
39
+ "homepage": "https://github.com/jiaxiantao/cos-design#readme",
40
+ "bugs": {
41
+ "url": "https://github.com/jiaxiantao/cos-design/issues"
34
42
  },
35
- "husky": {
36
- "hooks": {
37
- "pre-commit": "npm run lint-staged"
38
- }
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "git+https://github.com/jiaxiantao/cos-design.git"
39
46
  },
47
+ "author": "jiaxiantao <jiaxiantao@souche.com>",
48
+ "license": "MIT",
40
49
  "lint-staged": {
41
- "**/*.less": "stylelint --syntax less",
42
- "**/*.{js,jsx,tsx,ts,less,md,json}": [
43
- "prettier --write",
44
- "git add"
45
- ],
46
- "**/*.{js,jsx}": "npm run lint-staged:js",
47
- "**/*.{js,ts,tsx}": "npm run lint-staged:js"
50
+ "**/*.less": "stylelint",
51
+ "**/*.{ts,tsx,less,md,json}": "prettier --write",
52
+ "**/*.{ts,tsx}": "eslint --fix"
48
53
  },
49
54
  "devDependencies": {
50
- "@babel/core": "^7.15.0",
51
- "@babel/preset-env": "^7.15.0",
52
- "@babel/preset-react": "^7.14.5",
53
- "@types/react": "^17.0.19",
54
- "@types/react-dom": "^17.0.9",
55
- "@typescript-eslint/eslint-plugin": "^4.29.3",
56
- "@typescript-eslint/parser": "^4.29.3",
57
- "awesome-typescript-loader": "^5.2.1",
58
- "babel-loader": "^8.2.2",
59
- "clean-webpack-plugin": "^4.0.0-alpha.0",
60
- "cross-env": "^7.0.3",
61
- "css-loader": "^6.2.0",
62
- "eslint": "^7.32.0",
63
- "eslint-config-prettier": "^8.3.0",
64
- "eslint-plugin-prettier": "^3.4.1",
65
- "eslint-plugin-react": "^7.24.0",
66
- "eslint-plugin-react-hooks": "^4.2.0",
67
- "html-webpack-plugin": "^5.3.2",
68
- "husky": "^7.0.2",
69
- "less": "^4.1.1",
70
- "less-loader": "^10.0.1",
71
- "mini-css-extract-plugin": "^2.2.2",
72
- "prettier": "^2.3.2",
73
- "react": "^17.0.2",
74
- "react-dom": "^17.0.2",
75
- "style-loader": "^3.2.1",
76
- "ts-loader": "^9.2.5",
77
- "typescript": "^4.3.5",
78
- "webpack": "^5.51.1",
79
- "webpack-cli": "^4.8.0",
80
- "webpack-dev-server": "^4.0.0"
55
+ "@types/node": "^22.13.10",
56
+ "@types/react": "^18.3.18",
57
+ "@types/react-dom": "^18.3.5",
58
+ "@typescript-eslint/eslint-plugin": "^8.26.0",
59
+ "@typescript-eslint/parser": "^8.26.0",
60
+ "@vitejs/plugin-react": "^4.3.4",
61
+ "eslint": "^8.57.1",
62
+ "eslint-config-prettier": "^10.0.2",
63
+ "eslint-plugin-prettier": "^5.2.3",
64
+ "eslint-plugin-react": "^7.37.4",
65
+ "eslint-plugin-react-hooks": "^5.2.0",
66
+ "husky": "^9.1.7",
67
+ "less": "^4.2.2",
68
+ "lint-staged": "^15.4.3",
69
+ "only-allow": "^1.2.1",
70
+ "prettier": "^3.5.3",
71
+ "react": "^18.3.1",
72
+ "react-dom": "^18.3.1",
73
+ "react-router": "^6.30.0",
74
+ "react-router-dom": "^6.30.0",
75
+ "stylelint": "^16.15.0",
76
+ "stylelint-config-standard": "^37.0.0",
77
+ "typescript": "^5.8.2",
78
+ "vite": "^6.2.2",
79
+ "vite-plugin-dts": "^4.5.3",
80
+ "vite-plugin-lib-inject-css": "^2.2.1"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "react": ">=16.12.0",
84
84
  "react-dom": ">=16.12.0"
85
+ },
86
+ "engines": {
87
+ "node": ">=18",
88
+ "pnpm": ">=9"
89
+ },
90
+ "scripts": {
91
+ "setup": "node scripts/install.mjs",
92
+ "preinstall": "npx only-allow pnpm",
93
+ "dev": "vite",
94
+ "build": "tsc -p tsconfig.build.json --noEmit && vite build --mode lib",
95
+ "build:demo": "vite build",
96
+ "preview": "vite preview",
97
+ "pub": "pnpm build && pnpm publish",
98
+ "lint": "eslint \"src/**/*.{ts,tsx}\" && stylelint \"src/**/*.less\"",
99
+ "lint:fix": "eslint --fix \"src/**/*.{ts,tsx}\" && stylelint \"src/**/*.less\"",
100
+ "lint:js": "eslint \"src/**/*.{ts,tsx}\"",
101
+ "lint:style": "stylelint \"src/**/*.less\"",
102
+ "format": "prettier -c --write \"**/*.{ts,tsx,less,md,json}\"",
103
+ "lint-staged": "lint-staged"
85
104
  }
86
- }
105
+ }