broccoli-sourcemap-concat
Advanced tools
Comparing version 0.2.2 to 0.2.3
{ | ||
"name": "broccoli-sourcemap-concat", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Fast, good-enough concatenation with source maps.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "mocha" | ||
}, | ||
@@ -14,12 +14,16 @@ "repository": "https://github.com/ef4/broccoli-sourcemap-concat", | ||
"broccoli": "^0.13.3", | ||
"broccoli-merge-trees": "^0.2.1" | ||
"broccoli-merge-trees": "^0.2.1", | ||
"chai": "^1.10.0", | ||
"mkdirp": "^0.5.0", | ||
"mocha": "^2.0.1", | ||
"rsvp": "^3.0.14" | ||
}, | ||
"dependencies": { | ||
"broccoli-caching-writer": "git://github.com/ef4/broccoli-caching-writer#master", | ||
"broccoli-caching-writer": "0.5.3", | ||
"broccoli-concat": "0.0.12", | ||
"broccoli-kitchen-sink-helpers": "^0.2.5", | ||
"broccoli-writer": "^0.1.1", | ||
"fast-sourcemap-concat": " ^0.1.1", | ||
"fast-sourcemap-concat": " ^0.1.3", | ||
"lodash-node": "^2.4.1" | ||
} | ||
} |
@@ -11,9 +11,10 @@ var helpers = require('broccoli-kitchen-sink-helpers'); | ||
init: function(inputTrees, options) { | ||
this.options = merge({ | ||
inputFiles: ['**/*.js'], | ||
separator: '\n' | ||
}, options); | ||
if (!this.options.outputFile) { | ||
init: function() { | ||
if (!this.inputFiles) { | ||
this.inputFiles = ['**/*.js']; | ||
} | ||
if (!this.separator) { | ||
this.separator = '\n'; | ||
} | ||
if (!this.outputFile) { | ||
throw new Error("outputFile is required"); | ||
@@ -25,14 +26,15 @@ } | ||
var concat = this.concat = new ConcatWithSourcemap({ | ||
outputFile: path.join(outDir, this.options.outputFile), | ||
sourceRoot: this.options.sourceRoot, | ||
outputFile: path.join(outDir, this.outputFile), | ||
sourceRoot: this.sourceRoot, | ||
baseDir: inDir | ||
}); | ||
if (this.options.header) { | ||
concat.addSpace(this.options.header); | ||
if (this.header) { | ||
concat.addSpace(this.header + this.separator); | ||
} | ||
if (this.options.headerFiles) { | ||
this.options.headerFiles.forEach(function(hf) { | ||
if (this.headerFiles) { | ||
this.headerFiles.forEach(function(hf) { | ||
concat.addFile(hf); | ||
concat.addSpace(this.separator); | ||
}); | ||
@@ -45,3 +47,3 @@ } | ||
// multiGlob is obtuse. | ||
if (!error.message.match("did not match any files" || !this.options.allowNone)) { | ||
if (!error.message.match("did not match any files" || !this.allowNone)) { | ||
throw error; | ||
@@ -51,8 +53,9 @@ } | ||
if (this.options.footer) { | ||
concat.addSpace(this.options.footer); | ||
if (this.footer) { | ||
concat.addSpace(this.footer + this.separator); | ||
} | ||
if (this.options.footerFiles) { | ||
this.options.footerFiles.forEach(function(ff) { | ||
if (this.footerFiles) { | ||
this.footerFiles.forEach(function(ff) { | ||
concat.addFile(ff); | ||
concat.addSpace(this.separator); | ||
}); | ||
@@ -64,3 +67,3 @@ } | ||
addFiles: function(inDir) { | ||
helpers.multiGlob(this.options.inputFiles, { | ||
helpers.multiGlob(this.inputFiles, { | ||
cwd: inDir, | ||
@@ -67,0 +70,0 @@ root: inDir, |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable and can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
12560
24
261
2
0
6
4
1
+ Addedbroccoli-caching-writer@0.5.3(transitive)
+ Addedcore-object@0.0.2(transitive)
+ Addedpromise-map-series@0.2.3(transitive)
+ Addedsymlink-or-copy@1.3.1(transitive)