dotgitignore
find the closest .gitignore file, parse it, and apply ignore rules
Last updated 4 months ago by bcoe .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install dotgitignore 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 2.1.0                                ...           latest (4 months ago)

6 Versions

  • 2.1.0                                ...           4 months ago
  • 2.0.0                                ...           7 months ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 964
This Week 1,870
This Month 10,335
Last Day 906
Last Week 5,063
Last Month 13,357
Dependencies (2)
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |