grunt-inline
Advanced tools
Comparing version 0.2.6 to 0.2.7
@@ -9,3 +9,3 @@ { | ||
"description": "Inlines <img>, <script> and <link> tags into the same file.", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"keywords": [ | ||
@@ -12,0 +12,0 @@ "gruntplugin", |
@@ -77,2 +77,16 @@ /* | ||
ret = grunt.file.read( inlineFilePath ); | ||
// @otod need to be checked, add bye herbert | ||
var _more = src.match(/^(..\/)+/ig); | ||
if(_more = _more && _more[0]){ | ||
var _addMore = function(){ | ||
var _ret = arguments[0],_src = arguments[2]; | ||
if(!_src.match(/^http\:\/\//)){ | ||
_ret =arguments[1] + _more + arguments[2] + arguments[3]; | ||
grunt.log.writeln('inline >含有相对目录进行替换操作,替换之后的路径:' + _ret ); | ||
} | ||
return _ret; | ||
} | ||
ret = ret.replace(/(<script.+?src=["'])([^"']+?)(["'].*?><\/script>)/g,_addMore); | ||
} | ||
}else{ | ||
@@ -79,0 +93,0 @@ grunt.log.error("Couldn't find " + inlineFilePath + '!'); |
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
76857
327