packlyze 1.0.0 → 1.0.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.
- package/README.md +47 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Packlyze
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/packlyze)
|
|
4
|
+
[](https://github.com/iamabhshk/Packlyze/actions)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
# Packlyze
|
|
8
|
+
|
|
3
9
|
Advanced bundle analyzer with insights, recommendations, and historical tracking.
|
|
4
10
|
|
|
5
11
|
## 📊 Features
|
|
@@ -14,6 +20,8 @@ Advanced bundle analyzer with insights, recommendations, and historical tracking
|
|
|
14
20
|
|
|
15
21
|
## 🚀 Installation
|
|
16
22
|
|
|
23
|
+
You can install Packlyze globally or use it via npx:
|
|
24
|
+
|
|
17
25
|
```bash
|
|
18
26
|
npm install -g packlyze
|
|
19
27
|
# or
|
|
@@ -22,8 +30,12 @@ npx packlyze
|
|
|
22
30
|
|
|
23
31
|
## 📖 Usage
|
|
24
32
|
|
|
33
|
+
Packlyze works with stats files generated by webpack, rollup, or esbuild. For best results, generate a stats file in JSON format.
|
|
34
|
+
|
|
25
35
|
### Basic Analysis
|
|
26
36
|
|
|
37
|
+
Generate a stats file with your bundler, then analyze it:
|
|
38
|
+
|
|
27
39
|
```bash
|
|
28
40
|
# Generate webpack stats
|
|
29
41
|
webpack --profile --json > stats.json
|
|
@@ -37,12 +49,16 @@ packlyze analyze stats.json -o ./reports/bundle-report.html
|
|
|
37
49
|
|
|
38
50
|
### JSON Output
|
|
39
51
|
|
|
52
|
+
Get results in JSON format for CI/CD or further processing:
|
|
53
|
+
|
|
40
54
|
```bash
|
|
41
55
|
packlyze analyze stats.json --json
|
|
42
56
|
```
|
|
43
57
|
|
|
44
58
|
### As a Library
|
|
45
59
|
|
|
60
|
+
You can use Packlyze programmatically in your Node.js/TypeScript projects:
|
|
61
|
+
|
|
46
62
|
```typescript
|
|
47
63
|
import { Packlyze } from 'packlyze';
|
|
48
64
|
|
|
@@ -56,6 +72,8 @@ console.log(result.bundleStats.modules);
|
|
|
56
72
|
|
|
57
73
|
## 📁 Project Structure
|
|
58
74
|
|
|
75
|
+
Typical structure for a Packlyze-based project:
|
|
76
|
+
|
|
59
77
|
```
|
|
60
78
|
Packlyze-plus/
|
|
61
79
|
├── src/
|
|
@@ -77,37 +95,11 @@ Packlyze-plus/
|
|
|
77
95
|
└── README.md
|
|
78
96
|
```
|
|
79
97
|
|
|
80
|
-
## 🔧 Development
|
|
81
|
-
|
|
82
|
-
### Setup
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
npm install
|
|
86
|
-
npm run dev # Watch mode TypeScript compilation
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Build
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
npm run build # Compile TypeScript to JavaScript
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Testing
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
npm run test # Run all tests
|
|
99
|
-
npm run test:coverage # Generate coverage report
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Code Quality
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
npm run lint # ESLint check and fix
|
|
106
|
-
npm run format # Prettier formatting
|
|
107
|
-
```
|
|
108
98
|
|
|
109
99
|
## 📊 Analysis Output
|
|
110
100
|
|
|
101
|
+
Packlyze provides detailed metrics, recommendations, and insights to help you optimize your bundle.
|
|
102
|
+
|
|
111
103
|
The analyzer provides:
|
|
112
104
|
|
|
113
105
|
### Metrics
|
|
@@ -130,6 +122,8 @@ The analyzer provides:
|
|
|
130
122
|
|
|
131
123
|
## 🎯 Use Cases
|
|
132
124
|
|
|
125
|
+
Common scenarios where Packlyze is helpful:
|
|
126
|
+
|
|
133
127
|
- **Performance Optimization**: Identify and reduce bundle bloat
|
|
134
128
|
- **Code Splitting**: Find optimal splitting points
|
|
135
129
|
- **Dependency Analysis**: Detect unused or duplicate packages
|
|
@@ -138,6 +132,8 @@ The analyzer provides:
|
|
|
138
132
|
|
|
139
133
|
## 📝 Examples
|
|
140
134
|
|
|
135
|
+
Here are some example commands and configurations for different frameworks:
|
|
136
|
+
|
|
141
137
|
### Webpack Project
|
|
142
138
|
|
|
143
139
|
```bash
|
|
@@ -176,6 +172,8 @@ packlyze analyze dist/stats.json
|
|
|
176
172
|
|
|
177
173
|
## 🐛 Troubleshooting
|
|
178
174
|
|
|
175
|
+
If you encounter issues, check the following:
|
|
176
|
+
|
|
179
177
|
### "Stats file not found"
|
|
180
178
|
Ensure your stats.json path is correct and the file exists.
|
|
181
179
|
|
|
@@ -189,12 +187,25 @@ Consider:
|
|
|
189
187
|
- Removing unused dependencies
|
|
190
188
|
- Using lighter alternatives
|
|
191
189
|
|
|
190
|
+
## 📦 Publishing to NPM
|
|
191
|
+
|
|
192
|
+
To publish your own version of Packlyze:
|
|
193
|
+
1. Update the version in `package.json`.
|
|
194
|
+
2. Run `npm run build` to compile TypeScript.
|
|
195
|
+
3. Run tests with `npm run test`.
|
|
196
|
+
4. Login to NPM: `npm login`.
|
|
197
|
+
5. Publish: `npm publish`.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
192
201
|
## 📄 License
|
|
193
202
|
|
|
194
203
|
MIT
|
|
195
204
|
|
|
196
205
|
## 🤝 Contributing
|
|
197
206
|
|
|
207
|
+
We welcome contributions! Please follow the steps below:
|
|
208
|
+
|
|
198
209
|
Contributions welcome! Please:
|
|
199
210
|
|
|
200
211
|
1. Fork the repository
|
|
@@ -205,6 +216,11 @@ Contributions welcome! Please:
|
|
|
205
216
|
|
|
206
217
|
## 📞 Support
|
|
207
218
|
|
|
219
|
+
For issues and questions:
|
|
220
|
+
- GitHub Issues: [https://github.com/iamabhshk/Packlyze/issues](https://github.com/iamabhshk/Packlyze/issues)
|
|
221
|
+
- Email: [your-email]
|
|
222
|
+
- Twitter: [@yourhandle]
|
|
223
|
+
|
|
208
224
|
For issues and questions:
|
|
209
225
|
- GitHub Issues: [link]
|
|
210
226
|
- Email: [your-email]
|
|
@@ -212,8 +228,10 @@ For issues and questions:
|
|
|
212
228
|
|
|
213
229
|
## 🙏 Acknowledgments
|
|
214
230
|
|
|
231
|
+
Packlyze is built with TypeScript, Commander.js, and Chalk. Special thanks to all contributors and users!
|
|
232
|
+
|
|
215
233
|
Built with TypeScript, Commander.js, and Chalk
|
|
216
234
|
|
|
217
235
|
---
|
|
218
236
|
|
|
219
|
-
**Made with ❤️ by
|
|
237
|
+
**Made with ❤️ by Abhishek**
|