@ui-entropy/cli 0.2.0 โ†’ 0.2.1

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 +38 -61
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,12 +9,16 @@
9
9
 
10
10
  UI Entropy is a **professional developer tool** that scans your codebase to identify unused CSS. Think of it as **SonarQube for your UI** - helping teams maintain code quality, reduce technical debt, and optimize bundle sizes.
11
11
 
12
- **What you get:**
13
- - ๐Ÿš€ **Reduce bundle sizes** by removing dead CSS
14
- - ๐Ÿงน **Keep stylesheets clean** and maintainable
15
- - ๐Ÿ“Š **Track CSS waste** over time
16
- - โœ… **Prevent waste** in CI/CD pipelines
17
- - ๐Ÿ“ˆ **Team dashboards** _(coming soon)_ - Monitor trends across projects
12
+ **What it does:**
13
+ - ๐Ÿ” **Identifies unused CSS classes** - Scans your stylesheets and source code to find dead CSS
14
+ - ๐Ÿ“Š **Reports waste metrics** - Shows which classes are unused and calculates waste percentage
15
+ - ๐Ÿšจ **Fails CI builds** - Enforces quality gates with configurable waste thresholds
16
+ - ๐ŸŽฏ **Smart framework detection** - Auto-configures for Next.js, React, Vue, Angular, and more
17
+ - ๐Ÿ“ˆ **Provides actionable data** - JSON/summary output to track waste and inform cleanup decisions
18
+
19
+ **What's coming:**
20
+ - ๐Ÿข **Team dashboards** - Centralized monitoring and trend tracking across projects
21
+ - ๐Ÿค– **Automated cleanup** - Safe removal suggestions and PR integration
18
22
 
19
23
  ## ๐Ÿ“ฆ Installation
20
24
 
@@ -57,34 +61,45 @@ npx @ui-entropy/cli scan --threshold 50 # Fails if waste > 50%
57
61
  ## ๐Ÿ“Š Example Output
58
62
 
59
63
  ```
60
- ๐Ÿ” Scanning for CSS waste...
61
- โœ“ Found 3 stylesheets (45.2 KB)
62
- โœ“ Scanned 89 source files
64
+ โœ” Scan completed in 3601ms
65
+
66
+ ๐Ÿ“‚ Project: /path/to/your/project
67
+ ๐Ÿ“Š Files: 4 CSS, 2307 source
63
68
 
64
69
  ๐Ÿ” UI Entropy Analysis Report
65
- โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
70
+ โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
66
71
 
67
72
  ๐Ÿ“Š Summary
68
- Total CSS Size: 45.2 KB
69
- Total Rules: 1,247
70
- Files Scanned: 89
73
+ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
74
+ Total CSS Size: 8,200 bytes
75
+ Total Rules: 114
76
+ Files Scanned: 2307
71
77
 
72
78
  ๐ŸŽฏ Selectors
73
- Total Selectors: 1,247
74
- Used Selectors: 329 (26%)
75
- Unused Selectors: 918
79
+ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
80
+ Total Selectors: 61
81
+ Used Selectors: 41 (67%)
82
+ Unused Selectors: 20
83
+
84
+ Classes: 58 total
85
+ โ”œโ”€ Used: 38
86
+ โ””โ”€ Unused: 20
87
+
88
+ IDs: 3 total
89
+ โ”œโ”€ Used: 3
90
+ โ””โ”€ Unused: 0
76
91
 
77
92
  ๐Ÿ’ฐ CSS Waste Analysis
78
- Waste Percentage: 73.6%
79
- Estimated Wasted Bytes: 33.3 KB
93
+ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
94
+ Waste Percentage: 32.8%
95
+ Estimated Wasted Bytes: 2,689 bytes
80
96
 
81
97
  ๐Ÿšจ Top Unused Classes
82
- 1. .navbar-expand-lg
83
- 2. .btn-outline-secondary
84
- 3. .card-footer
98
+ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
99
+ 1. .container-fluid
100
+ 2. .container-lg
101
+ 3. .btn-sm
85
102
  ...
86
-
87
- ๐Ÿ’ก CRITICAL WASTE: Significant cleanup needed.
88
103
  ```
89
104
 
90
105
  ## ๐Ÿ› ๏ธ CLI Options
@@ -115,44 +130,6 @@ Create `.ui-entropy.json` in your project root:
115
130
  }
116
131
  ```
117
132
 
118
- ## ๐Ÿ”„ CI/CD Integration
119
-
120
- ### GitHub Actions
121
-
122
- ```yaml
123
- name: CSS Waste Check
124
- on: [push, pull_request]
125
-
126
- jobs:
127
- ui-entropy:
128
- runs-on: ubuntu-latest
129
- steps:
130
- - uses: actions/checkout@v3
131
- - uses: actions/setup-node@v3
132
- - run: npx @ui-entropy/cli scan --threshold 50 --format summary
133
- ```
134
-
135
- ### GitLab CI
136
-
137
- ```yaml
138
- ui-entropy:
139
- image: node:20
140
- script:
141
- - npx @ui-entropy/cli scan --threshold 50 --format summary
142
- ```
143
-
144
- ### Pre-commit Hook
145
-
146
- ```json
147
- {
148
- "husky": {
149
- "hooks": {
150
- "pre-commit": "npx @ui-entropy/cli scan --threshold 50 --format summary"
151
- }
152
- }
153
- }
154
- ```
155
-
156
133
  ## ๏ธ Roadmap
157
134
 
158
135
  **Available Now:**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui-entropy/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Professional CSS waste detection for modern teams - CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",