Skip to content

bcoe/dotgitignore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotgitignore

Build Status

find the closest .gitignore file, parse it, and apply ignore rules.

Usage

Given the following .gitignore:

.DS_Store
node_modules
coverage
.nyc_output
const dotgit = require('dotgitignore')()
dotgit.ignore('.DS_Store') // returns 'true'.
dotgit.ignore('README.md') // returns 'false'.

API

  • require('dotgitignore')([opts]): return instance of dotgitignore, optionally configured with opts:
    • opts.cwd: current working directory (defaults to process.cwd()).
  • dotgit.ignore(name): returns true if pattern is ignored, false otherwise.

About

find the closest .gitignore file, parse it, and apply ignore rules

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •