fast-sourcemap-concat
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -80,5 +80,4 @@ var fs = require('fs-extra'); | ||
SourceMap.prototype.addFileSource = function(filename, source) { | ||
SourceMap.prototype.addFileSource = function(filename, source, inputSrcMap) { | ||
var url; | ||
var inputSrcMap; | ||
@@ -98,4 +97,11 @@ if (source.length === 0) { | ||
if (typeof inputSrcMap === 'string') { | ||
inputSrcMap = JSON.parse(inputSrcMap); | ||
} | ||
if (url && (inputSrcMap = this._resolveSourcemap(filename, url))) { | ||
if (inputSrcMap === undefined && url) { | ||
inputSrcMap = this._resolveSourcemap(filename, url); | ||
} | ||
if (inputSrcMap) { | ||
source = this._addMap(filename, inputSrcMap, source); | ||
@@ -286,3 +292,3 @@ } else { | ||
var fullPath; | ||
if (source.slice(0, 1) === '/') { | ||
if (path.isAbsolute(source)) { | ||
fullPath = source; | ||
@@ -446,3 +452,3 @@ } else { | ||
SourceMap.prototype._warn = function(msg) { | ||
console.log(chalk.yellow(msg)); | ||
console.warn(chalk.yellow(msg)); | ||
}; | ||
@@ -449,0 +455,0 @@ |
{ | ||
"name": "fast-sourcemap-concat", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Concatenate files while generating or propagating sourcemaps.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -1,4 +0,7 @@ | ||
Fast Source Map Concatenation | ||
Fast Source Map Concatenation | ||
----------------------------- | ||
[](https://travis-ci.org/ef4/fast-sourcemap-concat) | ||
[](https://ci.appveyor.com/project/embercli/fast-sourcemap-concat/branch/master) | ||
This library lets you concatenate files (with or without their own | ||
@@ -5,0 +8,0 @@ pre-generated sourcemaps), and get a single output file along with a |
18398
509
22
163234