broccoli-sourcemap-concat
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -5,3 +5,3 @@ var SourceMapAwareConcat = require('./writer'); | ||
module.exports = function(inputTree, options) { | ||
if (!options && !options.outputFile) { | ||
if (!options || !options.outputFile) { | ||
throw new Error("outputFile is required"); | ||
@@ -8,0 +8,0 @@ } |
{ | ||
"name": "broccoli-sourcemap-concat", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Fast, good-enough concatenation with source maps.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -24,3 +24,3 @@ var helpers = require('broccoli-kitchen-sink-helpers'); | ||
updateCache: function(inDir, outDir) { | ||
this.concat = new ConcatWithSourcemap({ | ||
var concat = this.concat = new ConcatWithSourcemap({ | ||
outputFile: path.join(outDir, this.options.outputFile), | ||
@@ -32,5 +32,11 @@ sourceRoot: this.options.sourceRoot, | ||
if (this.options.header) { | ||
this.concat.addSpace(this.options.header); | ||
concat.addSpace(this.options.header); | ||
} | ||
if (this.options.headerFiles) { | ||
this.options.headerFiles.forEach(function(hf) { | ||
concat.addFile(hf); | ||
}); | ||
} | ||
try { | ||
@@ -46,4 +52,9 @@ this.addFiles(inDir); | ||
if (this.options.footer) { | ||
this.concat.addSpace(this.options.footer); | ||
concat.addSpace(this.options.footer); | ||
} | ||
if (this.options.footerFiles) { | ||
this.options.footerFiles.forEach(function(ff) { | ||
concat.addFile(ff); | ||
}); | ||
} | ||
return this.concat.end(); | ||
@@ -50,0 +61,0 @@ }, |
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
5178
81