broccoli-sourcemap-concat
Advanced tools
Comparing version 1.1.4 to 1.1.5
{ | ||
"name": "broccoli-sourcemap-concat", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Fast, good-enough concatenation with source maps.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,2 +6,3 @@ var CachingWriter = require('broccoli-caching-writer'); | ||
var helpers = require('broccoli-kitchen-sink-helpers'); | ||
var uniq = require('lodash.uniq'); | ||
@@ -99,3 +100,3 @@ function Combined() { | ||
SimpleConcat.prototype._addFiles = function(combined, inputPath, beginSection) { | ||
var files = this.listFiles(); | ||
var files = uniq(this.listFiles()); | ||
@@ -102,0 +103,0 @@ if (files.length === 0 && !this.allowNone) { |
@@ -105,5 +105,27 @@ /* global describe, afterEach, it, expect */ | ||
it('dedupe uniques in inputFiles', function() { | ||
it('dedupe uniques in inputFiles (with simpleconcat)', function() { | ||
var final = concat(firstFixture, { | ||
outputFile: '/staged.js', | ||
inputFiles: ['inner/first.js', 'inner/second.js', 'inner/first.js'], | ||
sourceMapConfig: { | ||
enabled: false | ||
} | ||
}); | ||
builder = new broccoli.Builder(final); | ||
return builder.build().then(function(result) { | ||
var actual = fs.readFileSync(result.directory + '/staged.js', 'UTF-8'); | ||
var firstFixture = path.join(__dirname, 'fixtures', 'first'); | ||
var first = fs.readFileSync(path.join(firstFixture, 'inner/first.js'), 'UTF-8'); | ||
var second = fs.readFileSync(path.join(firstFixture, 'inner/second.js'), 'UTF-8'); | ||
var expected = first + '\n' + second; | ||
assertFileEqual(actual, expected, 'output is wrong'); | ||
}); | ||
}); | ||
it('dedupe uniques in inputFiles (with sourcemaps)', function() { | ||
var final = concat(firstFixture, { | ||
outputFile: '/staged.js', | ||
inputFiles: ['inner/first.js', 'inner/second.js', 'inner/first.js'] | ||
@@ -110,0 +132,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
24795
570