repo-visualizer
repo-visualizer copied to clipboard
Respect gitignore
Other utilities like cloc
follow the .gitignore file. It would be great for the repo-visualizer to also follow the .gitignore file, rather than specifying what to ignore again with globs.
Here is an example on how to get the list of files that the repo-visualizer should use:
import { execa } from "execa";
import { getMonorepoPath } from "@nodejs/list-workspaces";
export async function gitLsFiles() {
const { stdout } = await execa("git", ["ls-files"], {
maxBuffer: 500_000_000,
cwd: await getMonorepoPath(),
});
return stdout;
}
makes a lot of sense, especially if it's ignored if there are paths specified. We would love a PR, if anyone is interested!