Permalink
Browse files

1. by bumping version of dependend jsdom to 0.2.19 fixed problems wit…

…h using juice with node 9.3 (used node-gyp instead node-waf)

2. fixed problems with inproper construction of test/cases - in .html/.out files was invalid html documents, jsdom automaticly fix them by wrapping using <html><body></body></html> tags, so all test/cases/* were wrong
3. added new test/cases/empty* test to ensure that juice is shy and tidy and conserve unstyled tags and empty documents.
  • Loading branch information...
Paweł Marzec
Paweł Marzec committed Nov 25, 2012
1 parent 91c2407 commit 0ccd3fc85d990dee4ea9d2d1eb454b2e5268cf19
View
@@ -1 +1,2 @@
node_modules
+*~
View
@@ -121,7 +121,7 @@ function juice (html, css, options) {
});
var inner = document.innerHTML;
-
+
// free the associated memory
// with lazily created parentWindow
document.parentWindow.close();
View
@@ -1,14 +1,15 @@
{
"name": "juice"
- , "version": "0.0.6"
+ , "version": "0.0.7"
, "description": "Inlines css into html source"
, "contributors": [
{ "name": "Guillermo Rauch", "email": "guillermo@learnboost.com" }
, { "name": "Arian Stolwijk", "email": "arian@aryweb.nl" }
+ , { "name": "Paweł Marzec", "email": "rork@cojestgrane.pl" }
]
, "dependencies": {
"cssom": "0.2.3"
- , "jsdom": "0.2.15"
+ , "jsdom": "0.2.19"
, "mootools-slick-parser": "1.3.2"
}
, "devDependencies": {
@@ -1,3 +1,4 @@
+<html><body>
<ul>
<li>
<ul>
@@ -9,3 +10,4 @@
</ul>
</li>
</ul>
+</body></html>
View
@@ -1,3 +1,4 @@
+<html><body>
<ul>
<li style="display: block; color: #f00;">
<ul>
@@ -9,3 +10,4 @@
</ul>
</li>
</ul>
+</body></html>
View
@@ -1 +1,3 @@
+<html><body>
<p id="test" class="woot">Woot</p>
+</body></html>
View
@@ -1 +1,3 @@
+<html><body>
<p id="test" class="woot" style="border: 1px solid #f00; display: inline-block;">Woot</p>
+</body></html>
View
@@ -1,2 +1,5 @@
+<html><body>
<div class="woot">Test</div>
<div class="woot">Test</div>
+</body></html>
+
View
@@ -1,2 +1,4 @@
+<html><body>
<div class="woot" style="overflow: hidden;">Test</div>
<div class="woot" style="overflow: hidden;">Test</div>
+</body></html>
@@ -1 +1,3 @@
+<html><body>
<p>woot</p>
+</body></html>
@@ -1 +1,3 @@
+<html><body>
<p style="background: url(/woot);">woot</p>
+</body></html>
@@ -1 +1,3 @@
+<html><body>
<p><em><em>woot</em></em></p>
+</body></html>
@@ -1 +1,3 @@
+<html><body>
<p><em style="background: blue; color: red;"><em style="background: blue;">woot</em></em></p>
+</body></html>
View
@@ -1 +1,3 @@
+<html><body>
<div id="test">woot</div>
+</body></html>
View
@@ -1 +1,3 @@
+<html><body>
<div id="test" style="display: none;">woot</div>
+</body></html>
@@ -1 +1,3 @@
+<html><body>
<a href="#">Test</a>
+</body></html>
@@ -1 +1,3 @@
+<html><body>
<a href="#" style="text-decoration: underline;">Test</a>
+</body></html>
@@ -1 +1,3 @@
+<html><body>
<a id="a" style="color: blue; background: green;">woot</a>
+</body></html>
View
@@ -1 +1,3 @@
+<html><body>
<a id="a" style="color: red; background: blue; border-style: dashed;">woot</a>
+</body></html>
@@ -1,2 +1,4 @@
+<html><body>
<a href="#" onclick="return false;">Google</a>
<p onclick="return false;">Google</p>
+</body></html>
@@ -1,2 +1,4 @@
+<html><body>
<a href="#" onclick="return false;">Google</a>
<p onclick="return false;" style="color: red;">Google</p>
+</body></html>
@@ -1,2 +1,4 @@
+<html><body>
<a href="#">Test</a>
<p>Test</p>
+</body></html>
@@ -1,2 +1,4 @@
+<html><body>
<a href="#" style="color: red;">Test</a>
<p style="color: red;">Test</p>
+</body></html>
@@ -1,5 +1,7 @@
+<html><body>
<div id="wrap" a="b">
<div class="wrap" id="wrap-2">
<div id="a"></div>
</div>
</div>
+</body></html>
@@ -1,5 +1,7 @@
+<html><body>
<div id="wrap" a="b">
<div class="wrap" id="wrap-2" style="display: inline-block;">
<div id="a" style="color: red; display: block; background: green; border-color: green;"></div>
</div>
</div>
+</body></html>
@@ -1 +1,3 @@
+<html><body>
<p style="color: red;">The color should stay intact</p>
+</body></html>
@@ -1 +1,4 @@
+<html><body>
<p style="color: red; background: blue;">The color should stay intact</p>
+</body></html>
+
View
@@ -1 +1,3 @@
+<html><body>
<p>Test</p>
+</body></html>
View
@@ -1 +1,3 @@
+<html><body>
<p style="border: 1px solid #f00; margin: 1px;">Test</p>
+</body></html>

0 comments on commit 0ccd3fc

Please sign in to comment.