dotgitignore
find the closest .gitignore file, parse it, and apply ignore rules
Last updated 7 years ago by bcoe .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm 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 (6 years ago)

6 Versions

  • 2.1.0                                ...           6 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.3                                ...           7 years ago
  • 1.0.2                                ...           7 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (5)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |