Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect gitignore #44

Open
jlarmstrongiv opened this issue Mar 16, 2022 · 1 comment
Open

Respect gitignore #44

jlarmstrongiv opened this issue Mar 16, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jlarmstrongiv
Copy link

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;
}
@jlarmstrongiv jlarmstrongiv changed the title feat: gitignore support Respect gitignore Mar 17, 2022
@Wattenberger Wattenberger added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Mar 25, 2022
@Wattenberger
Copy link
Contributor

makes a lot of sense, especially if it's ignored if there are paths specified. We would love a PR, if anyone is interested!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants