New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-pre-combo

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-pre-combo - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

33

index.js

@@ -24,3 +24,3 @@ /**

* @param {string} p 文件名==>like index.js
* @return {string} 路径名==>line HFE/generator-test/0.1.0/pages/abc/index.css
* @return {string} 路径名==>line HFE/generator-test/0.1.0/pages/abc/index.js
*/

@@ -44,17 +44,30 @@ function handlePath(p) {

}
chunk = chunk.replace(/<script[^>]+?src="([^"]+)"[^>]*><\/script>/igm, function ($, $1) {
var finalPath = handlePath($1);
return '<script src=\"' + finalPath + '\"></script>';
if ($1.indexOf('http://') > -1) {
var finalPath = $1;
return '<script src=\"' + finalPath + '\"></script>';
} else {
var finalPath = handlePath($1);
return '<script src=\"' + finalPath + '\"></script>';
}
});
chunk = chunk.replace(/<link[^>]+?href="([^"]+?)"[^>]+?rel="stylesheet"[^>]*>/igm, function ($, $1) {
var finalPath = handlePath($1);
return '<link href=\"' + finalPath + '\" rel="stylesheet"></script>';
if ($1.indexOf('http://') > -1) {
var finalPath = $1;
return '<script src=\"' + finalPath + '\"></script>';
} else {
var finalPath = handlePath($1);
return '<link href=\"' + finalPath + '\" rel="stylesheet"></script>';
}
});
chunk = chunk.replace(/<link[^>]+?rel="stylesheet"[^>]+?href="([^"]+?)"[^>]*>/igm, function ($, $1) {
var finalPath = handlePath($1);
return '<link rel="stylesheet" href=\"' + finalPath + '\"></script>';
if ($1.indexOf('http://') > -1) {
var finalPath = $1;
return '<script src=\"' + finalPath + '\"></script>';
} else {
var finalPath = handlePath($1);
return '<link rel="stylesheet" href=\"' + finalPath + '\"></script>';
}
});

@@ -66,2 +79,2 @@

});
};
};
{
"name": "gulp-pre-combo",
"version": "1.0.5",
"version": "1.0.6",
"description": "A gulp plugin to handle relative-path in html file.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -69,1 +69,5 @@ # gulp-pre-combo

```
#### changelog
* 2015-11-03 Filter label with the 'http://'
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