simple-merge-class-names 1.0.8 → 1.0.10

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.
Files changed (2) hide show
  1. package/README.md +17 -0
  2. package/package.json +21 -4
package/README.md CHANGED
@@ -12,6 +12,7 @@ A straightforward utility for merging CSS class names in `React + Tailwind` and
12
12
  - [Where This Package Excels](#where-this-package-excels)
13
13
  - [Source Code](#source-code)
14
14
  - [Argument Handling](#argument-handling)
15
+ - [Testing](#testing)
15
16
  - [Production Considerations](#production-considerations)
16
17
  - [License](#license)
17
18
 
@@ -123,6 +124,22 @@ export const mergeClassNames = (...args) => {
123
124
 
124
125
  `mergeClassNames` accepts multiple arguments but filters out `null`, `undefined`, and empty strings (`""`). Remaining values are either strings or are _implicitly converted_ to strings by the JavaScript engine, then joined with spaces to produce the final class name string.
125
126
 
127
+ ### Testing
128
+
129
+ This project uses `Vitest` as the test runner for fast, modern testing.
130
+
131
+ #### Run All Testing Once
132
+
133
+ ```bash
134
+ pnpm test
135
+ ```
136
+
137
+ #### Run Tests In Watch Mode
138
+
139
+ ```bash
140
+ pnpm test:watch
141
+ ```
142
+
126
143
  ## Production Considerations
127
144
 
128
145
  If you are considering this package for production, you might also want to look into `clsx` for more advanced features: [https://www.npmjs.com/package/clsx](https://www.npmjs.com/package/clsx)
package/package.json CHANGED
@@ -1,13 +1,27 @@
1
1
  {
2
2
  "name": "simple-merge-class-names",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Example usage: <div className = {mergeClassNames('flex', 'flex-col')}/>",
5
5
  "main": "mergeClassNames.js",
6
6
  "exports": "./mergeClassNames.js",
7
+ "files": [
8
+ "package.json",
9
+ "mergeClassNames.js",
10
+ "LICENSE.txt",
11
+ "README.md"
12
+ ],
7
13
  "scripts": {
8
- "test": "echo \"Error: no test specified\" && exit 1"
14
+ "test": "vitest",
15
+ "test:watch": "vitest --watch",
16
+ "test:ui": "vitest --ui"
9
17
  },
10
- "keywords": [],
18
+ "keywords": [
19
+ "merge",
20
+ "class-names-merger",
21
+ "utility",
22
+ "react",
23
+ "tailwindcss"
24
+ ],
11
25
  "author": "Abdullah Fatota",
12
26
  "license": "AGPL-3.0",
13
27
  "repository": {
@@ -17,5 +31,8 @@
17
31
  "bugs": {
18
32
  "url": "https://github.com/new-AF/simple-merge-class-names/issues"
19
33
  },
20
- "homepage": "https://github.com/new-AF/simple-merge-class-names"
34
+ "homepage": "https://github.com/new-AF/simple-merge-class-names",
35
+ "devDependencies": {
36
+ "vitest": "^3.2.3"
37
+ }
21
38
  }