包详细信息

dotgitignore

bcoe2.8mISC2.1.0

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

gitignore, git, ignore, .gitignore

自述文件

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.

更新日志

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

2.1.0 (2019-03-16)

Features

  • handle comments and rule negation (#3) (bafd1e0)

2.0.0 (2018-12-12)

Chores

  • require Node.js 6 and update dependencies (#4) (2df3179)

BREAKING CHANGES

  • Node 6 is now required

1.0.3 (2018-01-03)

Bug Fixes

  • minimatch dependency was missing (4e60ac0)

1.0.2 (2018-01-03)

Bug Fixes

1.0.1 (2018-01-02)

Bug Fixes

1.0.0 (2018-01-02)

Features

  • initial implementation of library (65246a1)