What is ignore-by-default?
The ignore-by-default npm package provides a list of directories that are commonly ignored by various tools and processes, such as version control systems and build tools. This can be useful for configuring tools to ignore these directories by default.
What are ignore-by-default's main functionalities?
Get Default Ignored Directories
This feature allows you to retrieve a list of directories that are commonly ignored by default. The code sample demonstrates how to use the package to get and print these directories.
const ignoreByDefault = require('ignore-by-default');
const ignoredDirectories = ignoreByDefault.directories();
console.log(ignoredDirectories);
Other packages similar to ignore-by-default
ignore
The 'ignore' package provides a way to filter out files and directories based on .gitignore rules. It is more flexible and allows custom ignore rules, whereas ignore-by-default provides a static list of commonly ignored directories.
minimatch
The 'minimatch' package is a glob matcher that can be used to match file paths against glob patterns. It is more general-purpose compared to ignore-by-default, which specifically lists directories to ignore.
glob
The 'glob' package allows you to match files using the patterns the shell uses, like stars and stuff. It can be used to find files and directories that match certain patterns, offering more control compared to the static list provided by ignore-by-default.
ignore-by-default
This is a package aimed at Node.js development tools. It provides a list of
directories that should probably be ignored by such tools, e.g. when watching
for file changes.
It's used by AVA and
nodemon.
Please contribute!
Installation
npm install ignore-by-default
Usage
The ignore-by-default
module exports a directories()
function, which will
return an array of directory names. These are the ones you should ignore.
const ignoredDirectories = require('ignore-by-default').directories()