broccoli-asset-rewrite
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -112,2 +112,3 @@ var Filter = require('broccoli-filter'); | ||
while (match = re.exec(newString)) { | ||
var replaceString = ''; | ||
if (ignoreLibraryCode.exec(match[1])) { | ||
@@ -117,6 +118,6 @@ continue; | ||
var replaceString = match[1].replace(assetPath, replacementPath); | ||
if (this.prepend && this.prepend !== '') { | ||
replaceString = this.prepend + replaceString; | ||
replaceString = this.prepend + replacementPath; | ||
} else { | ||
replaceString = match[1].replace(assetPath, replacementPath); | ||
} | ||
@@ -123,0 +124,0 @@ |
{ | ||
"name": "broccoli-asset-rewrite", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "broccoli plugin to rewrite a source tree from an asset map.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -108,18 +108,2 @@ var fs = require('fs'); | ||
it('rewrites svgs with prepend', function () { | ||
var sourcePath = 'tests/fixtures/svgs-prepend'; | ||
var tree = rewrite(sourcePath + '/input', { | ||
extensions: ['svg'], | ||
assetMap: { | ||
'icons.svg': 'icons-fingerprint.svg' | ||
}, | ||
prepend: 'https://cloudfront.net/' | ||
}); | ||
builder = new broccoli.Builder(tree); | ||
return builder.build().then(function (graph) { | ||
confirmOutput(graph.directory, sourcePath + '/output'); | ||
}); | ||
}); | ||
it('replaces the correct match for the file extension', function () { | ||
@@ -126,0 +110,0 @@ var sourcePath = 'tests/fixtures/extensions'; |
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
21324
47
336