dotgitignore
find the closest .gitignore file, parse it, and apply ignore rules
Last updated 7 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 (7 months ago)

6 Versions

  • 2.1.0                                ...           7 months ago
  • 2.0.0                                ...           10 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 247
This Week 2,701
This Month 5,714
Last Day 694
Last Week 2,644
Last Month 13,455
Dependencies (2)
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |