chop-logic-components 2.5.0 → 2.5.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/README.md +20 -96
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|

|
|
4
4
|
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
|
-
[](https://github.com/ChopLogic/chop-logic-components/actions/workflows/github-pages.yml)
|
|
7
7
|
[](https://codecov.io/gh/ChopLogic/chop-logic-components)
|
|
8
|
+
[](https://sonarcloud.io/summary/new_code?id=ChopLogic_chop-logic-components)
|
|
9
|
+
[](https://github.com/ChopLogic/chop-logic-components/actions/workflows/npm.yml)
|
|
8
10
|
[](CODE_OF_CONDUCT.md)
|
|
9
11
|
[](https://conventionalcommits.org)
|
|
10
12
|
|
|
@@ -19,7 +21,7 @@ Components has the tools to make it easier.
|
|
|
19
21
|
|
|
20
22
|
## 🔗 Links
|
|
21
23
|
|
|
22
|
-
- [Storybook Playground](https://
|
|
24
|
+
- [Storybook Playground](https://choplogic.github.io/chop-logic-components)
|
|
23
25
|
- [NPM package](https://www.npmjs.com/package/chop-logic-components)
|
|
24
26
|
|
|
25
27
|
## 📦 Installation
|
|
@@ -32,100 +34,22 @@ npm install chop-logic-components
|
|
|
32
34
|
yarn add chop-logic-components
|
|
33
35
|
```
|
|
34
36
|
|
|
35
|
-
##
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
npm run build
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### `build:storybook`
|
|
55
|
-
|
|
56
|
-
Builds the static version of the Storybook for deployment, outputting the files to the storybook-static directory. The
|
|
57
|
-
--quiet flag suppresses the build logs.
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npm run build:storybook
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### `prepare`
|
|
64
|
-
|
|
65
|
-
Runs the build script and then installs Husky hooks for managing Git hooks in the project.
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
npm run prepare
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### `format`
|
|
72
|
-
|
|
73
|
-
Runs [Prettier](https://prettier.io/) to automatically format TypeScript files (`.ts` and `.tsx`) in the project. This
|
|
74
|
-
script will write changes directly to the files.
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
npm run format
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### `lint`
|
|
81
|
-
|
|
82
|
-
Runs ESLint to analyze the code for potential errors and enforce coding standards.
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
npm run lint
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### `lint:fix`
|
|
89
|
-
|
|
90
|
-
Runs ESLint and automatically fixes issues where possible.
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
npm run lint:fix
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### `typecheck`
|
|
97
|
-
|
|
98
|
-
Run the TypeScript compiler (tsc) to perform type checking without generating output files. This script helps ensure
|
|
99
|
-
that the code adheres to TypeScript's type safety.
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
npm run typecheck
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### `test`
|
|
106
|
-
|
|
107
|
-
Run unit tests using Vitest, a fast testing framework designed for Vite projects.
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
npm run test
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### `test:ci`
|
|
114
|
-
|
|
115
|
-
Run the tests in continuous integration (CI) mode with Vitest, providing a streamlined output suitable for automated
|
|
116
|
-
environments.
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
npm run test:ci
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### `coverage`
|
|
123
|
-
|
|
124
|
-
Run unit tests using Vitest and generates a code coverage report using the v8 generator.
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
npm run coverage
|
|
128
|
-
```
|
|
37
|
+
## 📜 Available NPM Scripts
|
|
38
|
+
|
|
39
|
+
| Script | Description |
|
|
40
|
+
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
41
|
+
| `start` | Starts Storybook in development mode on port `6006` without opening a browser. |
|
|
42
|
+
| `build` | Builds the TypeScript types and compiles the library using Vite. |
|
|
43
|
+
| `build:storybook` | Builds a static version of Storybook into the `storybook-static` directory. |
|
|
44
|
+
| `prepare` | Runs the production build and sets up Husky git hooks. |
|
|
45
|
+
| `format` | Formats all TypeScript files using Prettier with the TypeScript parser. |
|
|
46
|
+
| `lint` | Runs ESLint on the project to report code style or quality issues. |
|
|
47
|
+
| `lint:fix` | Fixes auto-correctable ESLint issues and silences output. |
|
|
48
|
+
| `typecheck` | Performs a full type check without emitting output. |
|
|
49
|
+
| `test` | Runs unit tests using Vitest in watch mode (interactive). |
|
|
50
|
+
| `test:ci` | Runs tests once in CI mode and allows empty test sets. |
|
|
51
|
+
| `coverage` | Runs tests and generates a coverage report using Vitest. |
|
|
52
|
+
| `release:version` | Bumps the version (`patch`, `minor`, or `major`), commits the change, creates a Git tag, and pushes to `main`. Usage: `npm run release:version patch` |
|
|
129
53
|
|
|
130
54
|
## 🛠 Contributing
|
|
131
55
|
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"name": "chop-logic-components",
|
|
3
3
|
"repository": {
|
|
4
4
|
"type": "git",
|
|
5
|
-
"url": "git+https://github.com/
|
|
5
|
+
"url": "git+https://github.com/ChopLogic/chop-logic-components.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.5.
|
|
8
|
-
"description": "React
|
|
7
|
+
"version": "2.5.3",
|
|
8
|
+
"description": "Reusable React components and hooks for the Chop Logic project",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "dist/index.cjs.js",
|
|
11
11
|
"module": "dist/index.es.js",
|
|
@@ -15,16 +15,17 @@
|
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"start": "storybook dev -p 6006 --no-open",
|
|
18
|
+
"build": "tsc && vite build",
|
|
18
19
|
"build:storybook": "storybook build -- -o storybook-static --quiet",
|
|
19
20
|
"prepare": "npm run build && husky",
|
|
20
21
|
"format": "prettier --write --parser typescript '**/*.{ts,tsx}'",
|
|
21
22
|
"lint": "npx eslint",
|
|
22
23
|
"lint:fix": "npx eslint --fix --quiet",
|
|
23
24
|
"typecheck": "tsc --pretty --noEmit",
|
|
24
|
-
"build": "tsc && vite build",
|
|
25
25
|
"test": "vitest",
|
|
26
26
|
"test:ci": "vitest run --passWithNoTests",
|
|
27
|
-
"coverage": "vitest run --coverage"
|
|
27
|
+
"coverage": "vitest run --coverage",
|
|
28
|
+
"release:version": "node scripts/release-version.js"
|
|
28
29
|
},
|
|
29
30
|
"lint-staged": {
|
|
30
31
|
"*.(ts|tsx)": [
|
|
@@ -44,11 +45,11 @@
|
|
|
44
45
|
"styled-components"
|
|
45
46
|
],
|
|
46
47
|
"author": "Dmitrii Suroviagin",
|
|
47
|
-
"license": "
|
|
48
|
+
"license": "MIT",
|
|
48
49
|
"bugs": {
|
|
49
|
-
"url": "https://github.com/
|
|
50
|
+
"url": "https://github.com/ChopLogic/chop-logic-components/issues"
|
|
50
51
|
},
|
|
51
|
-
"homepage": "https://
|
|
52
|
+
"homepage": "https://choplogic.github.io/chop-logic-components",
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"react": "^19.0.0",
|
|
54
55
|
"react-dom": "^19.0.0"
|
|
@@ -57,8 +58,8 @@
|
|
|
57
58
|
"@commitlint/cli": "^19.7.1",
|
|
58
59
|
"@commitlint/config-conventional": "^19.7.1",
|
|
59
60
|
"@eslint/js": "^9.20.0",
|
|
60
|
-
"@storybook/addon-docs": "^9.1.
|
|
61
|
-
"@storybook/react-vite": "^9.1.
|
|
61
|
+
"@storybook/addon-docs": "^9.1.1",
|
|
62
|
+
"@storybook/react-vite": "^9.1.1",
|
|
62
63
|
"@testing-library/jest-dom": "^6.6.3",
|
|
63
64
|
"@testing-library/react": "^16.2.0",
|
|
64
65
|
"@types/node": "^22.13.0",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
71
72
|
"eslint-plugin-react-refresh": "^0.4.18",
|
|
72
73
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
73
|
-
"eslint-plugin-storybook": "^9.1.
|
|
74
|
+
"eslint-plugin-storybook": "^9.1.1",
|
|
74
75
|
"globals": "^15.14.0",
|
|
75
76
|
"husky": "^9.1.7",
|
|
76
77
|
"husky-init": "^8.0.0",
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"prettier": "^3.4.2",
|
|
79
80
|
"remark-gfm": "^4.0.1",
|
|
80
81
|
"sass": "^1.87.0",
|
|
81
|
-
"storybook": "^9.1.
|
|
82
|
+
"storybook": "^9.1.1",
|
|
82
83
|
"typescript": "^5.7.3",
|
|
83
84
|
"typescript-eslint": "^8.23.0",
|
|
84
85
|
"vite": "^6.0.11",
|