mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-19 17:13:49 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
21
node_modules/dotgitignore/index.js
generated
vendored
Normal file
21
node_modules/dotgitignore/index.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict'
|
||||
|
||||
const findUp = require('find-up')
|
||||
const fs = require('fs')
|
||||
const ignore = require('./lib/dotignore')
|
||||
const gitignoreFilename = '.gitignore'
|
||||
|
||||
class DotGitignore {
|
||||
constructor (opts) {
|
||||
const gitignorePath = findUp.sync(gitignoreFilename, opts)
|
||||
const content = gitignorePath ? fs.readFileSync(gitignorePath, 'utf8') : ''
|
||||
this.matcher = ignore.createMatcher(content)
|
||||
}
|
||||
ignore (name) {
|
||||
return this.matcher.shouldIgnore(name)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function (opts) {
|
||||
return new DotGitignore(opts)
|
||||
}
|
||||
Reference in New Issue
Block a user