@herb-tools/formatter 0.4.0 → 0.4.2

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 CHANGED
@@ -1,7 +1,10 @@
1
- # Herb Formatter <Badge type="info" text="coming soon" />
1
+ # Herb Formatter <Badge type="warning" text="experimental preview" />
2
2
 
3
3
  **Package:** [`@herb-tools/formatter`](https://www.npmjs.com/package/@herb-tools/formatter)
4
4
 
5
+ > [!WARNING] Experimental Preview
6
+ > This formatter is currently in experimental preview. While it works for many common cases, it may potentially corrupt files in edge cases. Only use on files that can be restored via git or other version control systems.
7
+
5
8
  ---
6
9
 
7
10
  Auto-formatter for HTML+ERB templates with intelligent indentation, line wrapping, and ERB-aware pretty-printing.
@@ -36,18 +39,18 @@ bun add @herb-tools/formatter
36
39
 
37
40
  ```bash
38
41
  # relative path
39
- herb-formatter templates/index.html.erb
42
+ herb-format templates/index.html.erb
40
43
 
41
44
  # absolute path
42
- herb-formatter /full/path/to/template.html.erb
45
+ herb-format /full/path/to/template.html.erb
43
46
  ```
44
47
 
45
48
  #### Format from stdin
46
49
 
47
50
  ```bash
48
- cat template.html.erb | herb-formatter
51
+ cat template.html.erb | herb-format
49
52
  # or explicitly use "-" for stdin
50
- herb-formatter - < template.html.erb
53
+ herb-format - < template.html.erb
51
54
  ```
52
55
 
53
56
  <!-- #### Configuration Options -->
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ import("../dist/herb-format.js")