@trim21/dprint-plugin-beancount 0.1.10 → 0.1.12

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 (3) hide show
  1. package/README.md +32 -5
  2. package/package.json +1 -1
  3. package/plugin.wasm +0 -0
package/README.md CHANGED
@@ -2,19 +2,46 @@
2
2
 
3
3
  Rust formatter for Beancount files with a reusable core library, a small CLI, and optional Python bindings.
4
4
 
5
- ## NPM / jsDelivr
6
- The published package includes plugin.wasm for browser/CDN usage.
5
+ ## Usage
7
6
 
8
- - Package: @trim21/dprint-plugin-beancount
9
- - jsDelivr (latest): https://cdn.jsdelivr.net/npm/@trim21/dprint-plugin-beancount@latest/plugin.wasm
10
- - Node usage: require the package and read `wasmPath` or call `getWasmBuffer()`.
7
+ ### cli/pypi package
8
+
9
+ - Format files in place (default): `beancount-format path/to/file.beancount`
10
+ - Check without modifying (exit 1 if reformat needed): `beancount-format --check path/to/file.beancount`
11
+
12
+ ## Config
13
+
14
+ The CLI auto-detects `pyproject.toml` from the working directory or provided paths and merges settings with any CLI overrides.
15
+
16
+ ```toml
17
+ [tool.beancount-format]
18
+ line-width = 70
19
+ indent-width = 2
20
+ new-line-kind = "lf"
21
+ ```
22
+
23
+ - Can be overridden from args: `--line-width 80 --indent-width 4 --new-line lf`
24
+
25
+ ### dprint
26
+
27
+ A [dprint](https://github.com/dprint/dprint) plugin is published in npm and can be fetched from jsDelivr directly:
28
+
29
+ ```json
30
+ {
31
+ "plugins": [
32
+ "https://cdn.jsdelivr.net/npm/@trim21/dprint-plugin-beancount@latest/plugin.wasm"
33
+ ]
34
+ }
35
+ ```
11
36
 
12
37
  ## Crates
38
+
13
39
  - crates/beancount-formatter: core library containing the formatter and configuration.
14
40
  - crates/beancount-formatter-cli: CLI wrapper around the formatter library.
15
41
  - crates/beancount-formatter-py: Python bindings built with PyO3/maturin.
16
42
 
17
43
  ## Development
44
+
18
45
  - Build CLI: `cargo build -p beancount-formatter-cli --release`
19
46
  - Run tests: `cargo test --workspace`
20
47
  - Format code: `cargo fmt --all`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trim21/dprint-plugin-beancount",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Wasm module for dprint-plugin-beancount.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
package/plugin.wasm CHANGED
Binary file