Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-asset-rewrite

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-asset-rewrite - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

7

index.js

@@ -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';

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc