Open jamesmunns opened 5 years ago
Additionally, it might be nice to add an --open
(similar to cargo doc --open
) to automatically open this report in the browser
Yeah. Ideally, we don't depend on the external diff tool at all, and use some Rust library.
However, I don't know of-the-shelf solution here: there are a couple of libraries for diffing strings using edit-distance and whatnot, but nothing I know can generate fancy html.
Maybe difference.rs?
EDIT: That probably only helps with the diff library, not generating HTML. For that, we might want to use some existing static site generator, with maybe zola, and some custom CSS/JS/templating
why not something like https://github.com/rtfpessoa/diff2html-cli
Also https://crates.io/crates/diffs
Yep, they fall into category of "diff two strings", but IIRC, don't have a too fancy results presentation. Though, difference.rs can do ANSI-escapes coloring.
There's also an interesting problem here of finding a minimal diff of directories (which accounts for file renames and motions).
a node module used in a tool to prevent an npm-like fuckup. full circle, I'd say.
https://nest.pijul.com/pijul_org/pijul But it is GPL...
I've got something here but it's a bit rough. It comes with a cli command too.
In order to review changes more easily, it might be nice to have an "output to html" feature