grunt-combo-html-css-js
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "grunt-combo-html-css-js", | ||
"description": "Combine css links and javscript files to html file with inline tags automatically", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"homepage": "https://github.com/jinjiang/grunt-combo-html-css-js", | ||
@@ -36,3 +36,3 @@ "author": { | ||
"peerDependencies": { | ||
"grunt": "~0.4.5" | ||
"grunt": ">=0.4.0" | ||
}, | ||
@@ -42,2 +42,2 @@ "keywords": [ | ||
] | ||
} | ||
} |
@@ -61,6 +61,9 @@ # grunt-combo-html-css-js | ||
comboall: { | ||
files: { | ||
'dest/combo.html': ['src/target.html'], | ||
}, | ||
}, | ||
main:{ | ||
files: [ | ||
{'dest/combo.html': ['src/target.html']} | ||
] | ||
} | ||
} | ||
}); | ||
@@ -67,0 +70,0 @@ ``` |
@@ -26,4 +26,4 @@ /* | ||
function combo(filepath) { | ||
var cssHrefPattern = /<link(?:[^>]*) href="(.+)"(?:[^>]*)>/g; | ||
var jsSrcPattern = /<script(?:[^>]*) src="(.+)"(?:[^>]*)>/g; | ||
var cssHrefPattern = /<link(?:[^>]*) href="([^"]+)"(?:[^>]*)>/g; | ||
var jsSrcPattern = /<script(?:[^>]*) src="([^"]+)"(?:[^>]*)>/g; | ||
@@ -33,3 +33,3 @@ var html = grunt.file.read(filepath); | ||
html = html.replace(cssHrefPattern, function (openTag, href) { | ||
if (href.match(/\:/)) { | ||
if (href.match(/\/\//)) { | ||
return openTag; | ||
@@ -41,3 +41,3 @@ } | ||
html = html.replace(jsSrcPattern, function (openTag, src) { | ||
if (src.match(/\:/)) { | ||
if (src.match(/\/\//)) { | ||
return openTag; | ||
@@ -44,0 +44,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
11459
96