Package Exports
- parse-gitignore
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parse-gitignore) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
parse-gitignore

Parse a gitignore file into an array of patterns. Comments and empty lines are stripped.
Install
Install with npm
$ npm i parse-gitignore --saveUsage
var gitignore = require('parse-gitignore');
// pass a filepath
var patterns = gitignore('.gitignore');
//=> ['*.DS_Store', 'node_modules', ...];Pass additional patterns
Since the function already does unique-ifying on patterns, you can optionally pass an additional array of patterns to add to the patterns parsed from .gitignore:
gitignore('.gitignore', ['foo', 'bar']);
//=> ['*.DS_Store', 'node_modules', 'foo', 'bar', ...]Related projects
- glob-fs: file globbing for node.js. speedy and powerful alternative to node-glob.
- is-glob: Returns
trueif the given string looks like a glob pattern. - micromatch: Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… more
Running tests
Install dev dependencies:
$ npm i -d && npm testContributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on July 09, 2015.