Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

ignore-walk

Package Overview
Dependencies
1
Maintainers
2
Versions
20
Issues
File Explorer

Advanced tools

ignore-walk

Nested/recursive `.gitignore`/`.npmignore` parsing and filtering.

    6.0.0latest

Version published
Maintainers
2
Weekly downloads
6,992,671
decreased by-11.23%

Weekly downloads

Changelog

Source

6.0.0 (2022-10-10)

⚠️ BREAKING CHANGES

  • ignore-walk is now compatible with the following semver range for node: ^14.17.0 || ^16.13.0 || >=18.0.0

Features

  • e723a53 #43 postinstall for dependabot template-oss PR (@lukekarrys)

Readme

Source

ignore-walk

Nested/recursive .gitignore/.npmignore parsing and filtering.

Walk a directory creating a list of entries, parsing any .ignore files met along the way to exclude files.

USAGE

const walk = require('ignore-walk') // All options are optional, defaults provided. // this function returns a promise, but you can also pass a cb // if you like that approach better. walk({ path: '...', // root dir to start in. defaults to process.cwd() ignoreFiles: [ '.gitignore' ], // list of filenames. defaults to ['.ignore'] includeEmpty: true|false, // true to include empty dirs, default false follow: true|false // true to follow symlink dirs, default false }, callback) // to walk synchronously, do it this way: const result = walk.sync({ path: '/wow/such/filepath' })

If you want to get at the underlying classes, they're at walk.Walker and walk.WalkerSync.

OPTIONS

  • path The path to start in. Defaults to process.cwd()

  • ignoreFiles Filenames to treat as ignore files. The default is ['.ignore']. (This is where you'd put .gitignore or .npmignore or whatever.) If multiple ignore files are in a directory, then rules from each are applied in the order that the files are listed.

  • includeEmpty Set to true to include empty directories, assuming they are not excluded by any of the ignore rules. If not set, then this follows the standard git behavior of not including directories that are empty.

    Note: this will cause an empty directory to be included if it would contain an included entry, even if it would have otherwise been excluded itself.

    For example, given the rules * (ignore everything) and !/a/b/c (re-include the entry at /a/b/c), the directory /a/b will be included if it is empty.

  • follow Set to true to treat symbolically linked directories as directories, recursing into them. There is no handling for nested symlinks, so ELOOP errors can occur in some cases when using this option. Defaults to false.

Keywords

FAQs

What is ignore-walk?

Nested/recursive `.gitignore`/`.npmignore` parsing and filtering.

Is ignore-walk popular?

The npm package ignore-walk receives a total of 5,626,491 weekly downloads. As such, ignore-walk popularity was classified as popular.

Is ignore-walk well maintained?

We found that ignore-walk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 2 open source maintainers collaborating on the project.

Last updated on 14 Oct 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc