Comparing version 3.0.14 to 3.1.0
@@ -35,3 +35,3 @@ 'use strict'; | ||
// @param {Array.<string>|string} pattern | ||
// @param {Array.<string>|string|Ignore} pattern | ||
@@ -43,8 +43,13 @@ }, { | ||
if (typeof pattern === 'string') { | ||
pattern = pattern.split(/\r?\n/g); | ||
if (pattern instanceof IgnoreBase) { | ||
this._rules = this._rules.concat(pattern._rules); | ||
this._added = true; | ||
} else { | ||
if (typeof pattern === 'string') { | ||
pattern = pattern.split(/\r?\n/g); | ||
} | ||
make_array(pattern).forEach(this._addPattern, this); | ||
} | ||
make_array(pattern).forEach(this._addPattern, this); | ||
// Some rules have just added to the ignore, | ||
@@ -51,0 +56,0 @@ // making the behavior changed. |
{ | ||
"name": "ignore", | ||
"version": "3.0.14", | ||
"version": "3.1.0", | ||
"description": "Ignore is a manager and filter for .gitignore rules.", | ||
@@ -5,0 +5,0 @@ "main": "./ignore.js", |
@@ -11,3 +11,3 @@ [![Build Status](https://travis-ci.org/kaelzhang/node-ignore.svg?branch=master)](https://travis-ci.org/kaelzhang/node-ignore) | ||
## Tested on | ||
##### Tested on | ||
@@ -17,2 +17,8 @@ - Linux + Node: `0.8` - `5.x` | ||
## Table Of Main Contents | ||
- [Usage](#usage) | ||
- [Guide for 2.x -> 3.x](#upgrade-2x---3x) | ||
- [Contributing](#contributing) | ||
## Usage | ||
@@ -71,3 +77,3 @@ | ||
- pattern `String` Ignore pattern. | ||
- pattern `String|Ignore` An ignore pattern string, or the `Ignore` instance(to inherit the rules of another `Ignore` instance) | ||
- patterns `Array.<pattern>` Array of ignore patterns. | ||
@@ -169,1 +175,16 @@ | ||
- `.addIgnoreFile()` is removed, see the [.addIgnoreFile](#addignorefilepath) section for details. | ||
**** | ||
## Contributing | ||
The code of `node-ignore` is based on es6 and babel, but the dependency of babel and its preset is not included in the `dependencies` field of package.json, so that the installation process of test cases will not fail in older versions of node. | ||
So use `bash install.sh` to install dependencies and `bash test.sh` to run test cases in your local machine. | ||
#### Collaborators | ||
- [SamyPesse](https://github.com/SamyPesse) *Samy Pessé* | ||
- [azproduction](https://github.com/azproduction) *Mikhail Davydov* | ||
- [TrySound](https://github.com/TrySound) *Bogdan Chadkin* | ||
- [JanMattner](https://github.com/JanMattner) *Jan Mattner* |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18222
317
187