Crates.io | specfmt |
lib.rs | specfmt |
version | 0.2.3 |
source | src |
created_at | 2022-11-04 21:39:01.73446 |
updated_at | 2023-01-23 01:02:34.735388 |
description | Command line tool to format Bikeshed and Wattsi specifications using WHATWG conventions |
homepage | |
repository | https://github.com/domfarolino/specfmt |
max_upload_size | |
id | 705469 |
size | 74,048 |
Like rustfmt and clang-format, but for web specs
It is expected that this tool be used when developing web specifications, such as the Bikeshed specs that WHATWG works on, or even the HTML Standard (which uses a different build system, but that doesn't matter for the purposes of this tool).
specfmt
contains adapted and sometimes fixed algorithms from the original
rewrapper, ported to Rust.
With Cargo installed, run:
$ cargo install specfmt
To install Cargo (the Rust package manager) follow these instructions.
You can format a web specification file
by running:
$ specfmt [file]
Note that file
is optional if you're inside the spec directory: specfmt
will
try and find the unique *.bs
file in the current directory, or source
(for
whatwg/html).
By default, specfmt
will:
To override any of this behavior, run specfmt --help
to see additional command
line flags that you can pass in.