Skip to content

Respect gitignoreΒ #44

Open
Open
@jlarmstrongiv

Description

@jlarmstrongiv

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions