concat-with-sourcemaps
Advanced tools
Comparing version 1.0.1 to 1.0.2
14
index.js
@@ -13,3 +13,3 @@ 'use strict'; | ||
this.sourceMapping = generateSourceMap; | ||
this.content = new Buffer(0); | ||
this.contentParts = []; | ||
@@ -44,6 +44,6 @@ if (separator === undefined) { | ||
if (this.content.length !== 0) { | ||
this.content = Buffer.concat([this.content, this.separator]); | ||
if (this.contentParts.length !== 0) { | ||
this.contentParts.push(this.separator); | ||
} | ||
this.content = Buffer.concat([this.content, content]); | ||
this.contentParts.push(content); | ||
@@ -109,2 +109,8 @@ if (this.sourceMapping) { | ||
Object.defineProperty(Concat.prototype, 'content', { | ||
get: function content() { | ||
return Buffer.concat(this.contentParts); | ||
} | ||
}); | ||
Object.defineProperty(Concat.prototype, 'sourceMap', { | ||
@@ -111,0 +117,0 @@ get: function sourceMap() { |
{ | ||
"name": "concat-with-sourcemaps", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Concatenate file contents with a custom separator and generate a source map", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/floridoo/concat-with-sourcemaps", |
7198
106