grunt-ng-annotate
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -136,2 +136,14 @@ /** | ||
}, | ||
multipleFileSources: { | ||
options: { | ||
add: false, | ||
remove: true, | ||
}, | ||
files: [{ | ||
expand: true, | ||
cwd: 'test/fixtures', | ||
src: ['multiple-1.js', 'multiple-2.js'], | ||
dest: 'test/tmp', | ||
}], | ||
}, | ||
}, | ||
@@ -138,0 +150,0 @@ |
{ | ||
"name": "grunt-ng-annotate", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Add, remove and rebuild AngularJS dependency injection annotations.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/mzgol/grunt-ng-annotate", |
@@ -25,33 +25,33 @@ /** | ||
// Iterate over all specified file groups. | ||
this.files.forEach(function (mapping) { | ||
var tmpFilePath = mapping.dest; // use the destination file as a temporary source one | ||
if (!options.ngAnnotateOptions) { | ||
options.ngAnnotateOptions = {}; | ||
} | ||
if (!options.ngAnnotateOptions) { | ||
options.ngAnnotateOptions = {}; | ||
} | ||
if (options.add != null) { | ||
options.ngAnnotateOptions.add = options.add; | ||
delete options.add; | ||
} else { | ||
options.ngAnnotateOptions.add = true; | ||
} | ||
if (options.add != null) { | ||
options.ngAnnotateOptions.add = options.add; | ||
delete options.add; | ||
} else { | ||
options.ngAnnotateOptions.add = true; | ||
} | ||
if (options.remove != null) { | ||
options.ngAnnotateOptions.remove = options.remove; | ||
delete options.remove; | ||
} else { | ||
options.ngAnnotateOptions.remove = false; | ||
} | ||
if (options.remove != null) { | ||
options.ngAnnotateOptions.remove = options.remove; | ||
delete options.remove; | ||
} else { | ||
options.ngAnnotateOptions.remove = false; | ||
} | ||
if (options.regexp != null) { | ||
options.ngAnnotateOptions.regexp = options.regexp; | ||
delete options.regexp; | ||
} | ||
if (options.regexp != null) { | ||
options.ngAnnotateOptions.regexp = options.regexp; | ||
delete options.regexp; | ||
} | ||
if (options.singleQuotes != null) { | ||
options.ngAnnotateOptions.single_quotes = options.singleQuotes; | ||
delete options.singleQuotes; | ||
} | ||
if (options.singleQuotes != null) { | ||
options.ngAnnotateOptions.single_quotes = options.singleQuotes; | ||
delete options.singleQuotes; | ||
} | ||
// Iterate over all specified file groups. | ||
this.files.forEach(function (mapping) { | ||
var tmpFilePath = mapping.dest; // use the destination file as a temporary source one | ||
@@ -58,0 +58,0 @@ if (mapping.dest) { |
@@ -62,2 +62,7 @@ // Note: we don't need to test full ngAnnotate functionality here as that's already | ||
}); | ||
it('should pass the correct options when using multiple input sources', function () { | ||
expect(readTmp('multiple-1.js')).to.be(readFix('not-annotated.js')); | ||
expect(readTmp('multiple-2.js')).to.be(readFix('not-annotated.js')); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
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
87349
34
663