VisCommandsvis ignore

vis ignore

Generate or merge an ignore file (.dockerignore / .vercelignore / .npmignore / .slugignore) without adding duplicate entries.

vis ignore

Generates a curated set of ignore patterns for files that don't belong in a build context or published package — docs, type-defs, source maps, tests, CI config, editor files — and merges them into an existing ignore file without adding entries that are already present. Re-running is idempotent.

Inspired by untracked, but reimplemented dependency-free and monorepo-aware.

Looking for the CI "Ignored Build Step" gate that used to live at vis ignore? It moved to vis ci ignore.

Usage

vis ignore [options]

Targets

The --target flag selects which ignore file to write and which extras to include:

TargetFileIncludes node_modules?
docker (default).dockerignoreYes (built inside the image)
vercel.vercelignoreYes
slug.slugignoreYes
npm.npmignoreNo — npm excludes it from tarballs already

Examples

vis ignore                          # print a .dockerignore (deduped against an existing one)
vis ignore --write                  # write/merge .dockerignore in place
vis ignore --target=vercel --write  # write a .vercelignore
vis ignore --target=npm --json      # emit the npm-target result as JSON

Merging (no duplicate entries)

When the target file already exists, vis ignore reads it, compares each candidate pattern against the existing entries (verbatim, case-sensitive), and appends only the missing ones under a # Added by vis ignore section. Entries already present — including any you added by hand — are never duplicated or reordered. If nothing is missing, the file is left untouched.

By default the merged result is printed to stdout; pass --write to save it, or --json for a machine-readable { target, file, added } record.

Options

OptionDefaultDescription
--targetdockerIgnore-file target: docker, vercel, npm, slug
--writefalseWrite the result to disk instead of printing it
--jsonfalseEmit the result as JSON

See also

  • vis docker — Docker scaffold/prune, Dockerfile generation, and hadolint linting
  • vis ci ignore — CI "Ignored Build Step" gate for Vercel/Netlify
Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues