fast-sourcemap-concat
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -25,2 +25,3 @@ 'use strict'; | ||
this.baseDir = opts.baseDir; | ||
this.fs = opts.fs ? opts.fs : fs; | ||
this.outputFile = opts.outputFile; | ||
@@ -78,3 +79,3 @@ this.cache = opts.cache; | ||
addFile(filename) { | ||
let source = ensurePosix(fs.readFileSync(this._resolveFile(filename), 'utf-8')); | ||
let source = ensurePosix(this.fs.readFileSync(this._resolveFile(filename), 'utf-8')); | ||
this._sizes[filename] = source.length; | ||
@@ -235,3 +236,3 @@ return this.addFileSource(filename, source); | ||
} else if (this.baseDir && url.slice(0,1) === '/') { | ||
srcMap = fs.readFileSync( | ||
srcMap = this.fs.readFileSync( | ||
path.join(this.baseDir, url), | ||
@@ -241,3 +242,3 @@ 'utf8' | ||
} else { | ||
srcMap = fs.readFileSync( | ||
srcMap = this.fs.readFileSync( | ||
path.join(path.dirname(this._resolveFile(filename)), url), | ||
@@ -324,3 +325,3 @@ 'utf8' | ||
} | ||
return ensurePosix(fs.readFileSync(fullPath, 'utf-8')); | ||
return ensurePosix(this.fs.readFileSync(fullPath, 'utf-8')); | ||
}.bind(this)); | ||
@@ -327,0 +328,0 @@ } |
{ | ||
"name": "fast-sourcemap-concat", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Concatenate files while generating or propagating sourcemaps.", | ||
@@ -28,2 +28,3 @@ "main": "lib/index.js", | ||
"chai": "^4.1.2", | ||
"fs-merger": "^3.0.2", | ||
"mocha": "^5.2.0", | ||
@@ -30,0 +31,0 @@ "mocha-eslint": "^4.1.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
20365
549
6