ts-analyzer 1.2.0 → 1.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.
- package/README.md +22 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,6 +58,7 @@ Options:
|
|
|
58
58
|
--no-color disable colored output
|
|
59
59
|
--no-safety disable TypeScript safety analysis
|
|
60
60
|
--no-complexity disable code complexity analysis
|
|
61
|
+
-f, --format <type> output format (text or json)
|
|
61
62
|
-h, --help display help for command
|
|
62
63
|
```
|
|
63
64
|
|
|
@@ -80,7 +81,11 @@ npx ts-analyzer --no-safety
|
|
|
80
81
|
|
|
81
82
|
## Output
|
|
82
83
|
|
|
83
|
-
The analyzer
|
|
84
|
+
The analyzer can output results in two formats: `text` (default) and `json`.
|
|
85
|
+
|
|
86
|
+
### Text Output (Default)
|
|
87
|
+
|
|
88
|
+
The text output provides five main sections:
|
|
84
89
|
|
|
85
90
|
### 1. Project Summary
|
|
86
91
|
Shows overall statistics including:
|
|
@@ -325,6 +330,22 @@ The `ts-analyzer` is a significant improvement over the previous `react-loc-anal
|
|
|
325
330
|
5. **Modern Implementation**: Fully written in TypeScript with strong typing throughout
|
|
326
331
|
6. **Better Performance**: Optimized for faster analysis of large TypeScript projects
|
|
327
332
|
|
|
333
|
+
## Configuration File
|
|
334
|
+
|
|
335
|
+
You can configure `ts-analyzer` using a `ts-analyzer.config.json` file in the root of your project. This allows you to persist your settings without passing them as CLI arguments every time.
|
|
336
|
+
|
|
337
|
+
```json
|
|
338
|
+
{
|
|
339
|
+
"safety": true,
|
|
340
|
+
"complexity": true,
|
|
341
|
+
"format": "text",
|
|
342
|
+
"exclude": ["node_modules", "dist", ".next"],
|
|
343
|
+
"include": [".js", ".ts", ".tsx"]
|
|
344
|
+
}
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
CLI arguments will always take precedence over the configuration file.
|
|
348
|
+
|
|
328
349
|
## Default Configuration
|
|
329
350
|
|
|
330
351
|
### Included File Extensions
|
package/package.json
CHANGED