@herb-tools/formatter 0.4.0

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 ADDED
@@ -0,0 +1,59 @@
1
+ # Herb Formatter <Badge type="info" text="coming soon" />
2
+
3
+ **Package:** [`@herb-tools/formatter`](https://www.npmjs.com/package/@herb-tools/formatter)
4
+
5
+ ---
6
+
7
+ Auto-formatter for HTML+ERB templates with intelligent indentation, line wrapping, and ERB-aware pretty-printing.
8
+
9
+ Perfect for format-on-save in editors and formatting verification in CI/CD pipelines. Transforms templates into consistently formatted, readable code while preserving all functionality.
10
+
11
+ ### Installation
12
+
13
+
14
+ :::code-group
15
+ ```shell [npm]
16
+ npm add @herb-tools/formatter
17
+ ```
18
+
19
+ ```shell [pnpm]
20
+ pnpm add @herb-tools/formatter
21
+ ```
22
+
23
+ ```shell [yarn]
24
+ yarn add @herb-tools/formatter
25
+ ```
26
+
27
+ ```shell [bun]
28
+ bun add @herb-tools/formatter
29
+ ```
30
+ :::
31
+
32
+ ### Usage
33
+
34
+
35
+ #### Format a file
36
+
37
+ ```bash
38
+ # relative path
39
+ herb-formatter templates/index.html.erb
40
+
41
+ # absolute path
42
+ herb-formatter /full/path/to/template.html.erb
43
+ ```
44
+
45
+ #### Format from stdin
46
+
47
+ ```bash
48
+ cat template.html.erb | herb-formatter
49
+ # or explicitly use "-" for stdin
50
+ herb-formatter - < template.html.erb
51
+ ```
52
+
53
+ <!-- #### Configuration Options -->
54
+
55
+ <!-- TODO -->
56
+
57
+ <!-- #### CLI Usage -->
58
+
59
+ <!-- TODO -->
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ import("../dist/herb-formatter.js")