grunt-combohtml
Advanced tools
Comparing version 0.1.42 to 0.1.43
{ | ||
"name": "grunt-combohtml", | ||
"description": "combine build html with ssi.", | ||
"version": "0.1.42", | ||
"version": "0.1.43", | ||
"homepage": "https://github.com/jayli/grunt-combohtml", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -82,8 +82,17 @@ // 'use strict'; | ||
var source = []; | ||
for (var i = 0; i < arr.length; i++) { | ||
if (!arr[i].match(baseUrl)) { | ||
continue; | ||
var toReplacedPrefix = 'http://' + baseUrl + '/'; | ||
arr.forEach(function(jsPath, idx){ | ||
if(jsPath.indexOf('??') != -1) { | ||
// 如果该 js 引用中已经包含 combo,需要先解开 combo | ||
var subComboParsed = jsPath.split('??'); | ||
var prefix = subComboParsed[0].replace(toReplacedPrefix, ''); | ||
var subComboAssets = subComboParsed[1].split(','); | ||
subComboAssets.forEach(function(subComboAsset){ | ||
source.push(path.join(prefix, subComboAsset)); | ||
}); | ||
} else { | ||
source.push(jsPath.replace(toReplacedPrefix, '')); | ||
} | ||
source.push(arr[i].replace('http://' + baseUrl + '/', '')); | ||
} | ||
}); | ||
return (source.length > 0) ? ('http://' + baseUrl + '/??' + source.join(',')).replace('????', '??') : ''; | ||
@@ -90,0 +99,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
160039
4034