From 2fa0be1938947174617cb10da9e8f928a00afea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Z=C3=B6rb?= Date: Mon, 18 Apr 2016 06:38:20 +0200 Subject: [PATCH 1/5] cli: exit after stdout.write --- cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.js b/cli.js index 0bf02257..3b9939e9 100755 --- a/cli.js +++ b/cli.js @@ -142,7 +142,7 @@ function run(data) { if (err) { error(err); } else { - process.stdout.write(val); + process.stdout.write(val, process.exit); } }); } catch (err) { From 1d124336fb5352b7c6734f669bb4f713b0a29f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Z=C3=B6rb?= Date: Mon, 18 Apr 2016 17:10:59 +0200 Subject: [PATCH 2/5] bump inline-critical --- package.json | 2 +- test/expected/generate-ignorefont.html | 17 +- .../generateInline-external-extract.html | 21 +- .../generateInline-external-extract2.html | 21 +- .../generateInline-external-minified.html | 21 +- .../generateInline-external-minified2.html | 21 +- test/expected/generateInline-extract.html | 17 +- test/expected/generateInline-minified.html | 17 +- test/expected/generateInline-svg.html | 13 +- test/expected/generateInline.html | 681 +++++++++--------- test/expected/streams-default.html | 127 ++-- 11 files changed, 464 insertions(+), 494 deletions(-) diff --git a/package.json b/package.json index 720e2f72..9010d05c 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "gulp-util": "^3.0.2", "imageinliner": "^0.2.3", "indent-string": "^2.1.0", - "inline-critical": "^1.0.0", + "inline-critical": "^2.1.5", "lodash": "^4.0.0", "meow": "^3.3.0", "mime-types": "^2.1.6", diff --git a/test/expected/generate-ignorefont.html b/test/expected/generate-ignorefont.html index 34b89372..6ff304dd 100644 --- a/test/expected/generate-ignorefont.html +++ b/test/expected/generate-ignorefont.html @@ -4,16 +4,13 @@ Font-face - - + body { + font-family: 'PT Sans', sans-serif; + } + + + +

should be styled by @font-face

diff --git a/test/expected/generateInline-external-extract.html b/test/expected/generateInline-external-extract.html index 4d0468bc..4d2d0c4b 100644 --- a/test/expected/generateInline-external-extract.html +++ b/test/expected/generateInline-external-extract.html @@ -9,18 +9,15 @@ - - - - + .header,.jumbotron{border-bottom:1px solid #e5e5e5}.btn,.jumbotron{text-align:center}body{padding-top:20px;padding-bottom:20px}.header,.marketing{padding-left:15px;padding-right:15px}.header h3{margin-top:0;margin-bottom:0;line-height:40px;padding-bottom:19px}.jumbotron .btn{font-size:21px;padding:14px 24px}.marketing{margin:40px 0}@media screen and (min-width:768px){.container{max-width:730px}.header,.marketing{padding-left:0;padding-right:0}.header{margin-bottom:30px}.jumbotron{border-bottom:0}}.col-lg-6,.container{padding-right:15px;padding-left:15px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:62.5%}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}a{background:0 0;color:#428bca;text-decoration:none}h1{margin:.67em 0;font-size:36px}h1,h3,h4{margin-bottom:10px;font-family:inherit;font-weight:500;line-height:1.1;color:inherit}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}h1,h3{margin-top:20px}h3{font-size:24px}h4{margin-top:10px;font-size:18px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}.text-muted{color:#999}ul{margin-top:0;margin-bottom:10px}.btn,.nav{margin-bottom:0}.container{margin-right:auto;margin-left:auto}@media (min-width:768px){.lead{font-size:21px}.container{width:750px}}@media (min-width:992px){.container{width:970px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-6{position:relative;min-height:1px}@media (min-width:1200px){.container{width:1170px}.col-lg-6{float:left;width:50%}}.btn{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;white-space:nowrap;vertical-align:middle;background-image:none;border:1px solid transparent;border-radius:4px}.nav>li,.nav>li>a{position:relative;display:block}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.nav{padding-left:0;list-style:none}.nav>li>a{padding:10px 15px}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a{color:#fff;background-color:#428bca}.jumbotron,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.container:after,.container:before,.nav:after,.nav:before,.row:after,.row:before{display:table;content:" "}.container:after,.nav:after,.row:after{clear:both}.pull-right{float:right!important}@-ms-viewport{width:device-width} + + + + + + + + diff --git a/test/expected/generateInline-external-extract2.html b/test/expected/generateInline-external-extract2.html index cc13cb26..5e7085b2 100644 --- a/test/expected/generateInline-external-extract2.html +++ b/test/expected/generateInline-external-extract2.html @@ -9,18 +9,15 @@ - - - - + .header,.jumbotron{border-bottom:1px solid #e5e5e5}.btn,.jumbotron{text-align:center}body{padding-top:20px;padding-bottom:20px}.header,.marketing{padding-left:15px;padding-right:15px}.header h3{margin-top:0;margin-bottom:0;line-height:40px;padding-bottom:19px}.jumbotron .btn{font-size:21px;padding:14px 24px}.marketing{margin:40px 0}@media screen and (min-width:768px){.container{max-width:730px}.header,.marketing{padding-left:0;padding-right:0}.header{margin-bottom:30px}.jumbotron{border-bottom:0}}.col-lg-6,.container{padding-right:15px;padding-left:15px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:62.5%}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}a{background:0 0;color:#428bca;text-decoration:none}h1{margin:.67em 0;font-size:36px}h1,h3,h4{margin-bottom:10px;font-family:inherit;font-weight:500;line-height:1.1;color:inherit}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}h1,h3{margin-top:20px}h3{font-size:24px}h4{margin-top:10px;font-size:18px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}.text-muted{color:#999}ul{margin-top:0;margin-bottom:10px}.btn,.nav{margin-bottom:0}.container{margin-right:auto;margin-left:auto}@media (min-width:768px){.lead{font-size:21px}.container{width:750px}}@media (min-width:992px){.container{width:970px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-6{position:relative;min-height:1px}@media (min-width:1200px){.container{width:1170px}.col-lg-6{float:left;width:50%}}.btn{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;white-space:nowrap;vertical-align:middle;background-image:none;border:1px solid transparent;border-radius:4px}.nav>li,.nav>li>a{position:relative;display:block}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.nav{padding-left:0;list-style:none}.nav>li>a{padding:10px 15px}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a{color:#fff;background-color:#428bca}.jumbotron,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.container:after,.container:before,.nav:after,.nav:before,.row:after,.row:before{display:table;content:" "}.container:after,.nav:after,.row:after{clear:both}.pull-right{float:right!important}@-ms-viewport{width:device-width} + + + + + + + + diff --git a/test/expected/generateInline-external-minified.html b/test/expected/generateInline-external-minified.html index 64da9548..5cc81cab 100644 --- a/test/expected/generateInline-external-minified.html +++ b/test/expected/generateInline-external-minified.html @@ -9,18 +9,15 @@ - - - - + .header,.jumbotron{border-bottom:1px solid #e5e5e5}.btn,.jumbotron{text-align:center}body{padding-top:20px;padding-bottom:20px}.header,.marketing{padding-left:15px;padding-right:15px}.header h3{margin-top:0;margin-bottom:0;line-height:40px;padding-bottom:19px}.jumbotron .btn{font-size:21px;padding:14px 24px}.marketing{margin:40px 0}@media screen and (min-width:768px){.container{max-width:730px}.header,.marketing{padding-left:0;padding-right:0}.header{margin-bottom:30px}.jumbotron{border-bottom:0}}.col-lg-6,.container{padding-right:15px;padding-left:15px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:62.5%}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}a{background:0 0;color:#428bca;text-decoration:none}h1{margin:.67em 0;font-size:36px}h1,h3,h4{margin-bottom:10px;font-family:inherit;font-weight:500;line-height:1.1;color:inherit}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}h1,h3{margin-top:20px}h3{font-size:24px}h4{margin-top:10px;font-size:18px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}.text-muted{color:#999}ul{margin-top:0;margin-bottom:10px}.btn,.nav{margin-bottom:0}.container{margin-right:auto;margin-left:auto}@media (min-width:768px){.lead{font-size:21px}.container{width:750px}}@media (min-width:992px){.container{width:970px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-6{position:relative;min-height:1px}@media (min-width:1200px){.container{width:1170px}.col-lg-6{float:left;width:50%}}.btn{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;white-space:nowrap;vertical-align:middle;background-image:none;border:1px solid transparent;border-radius:4px}.nav>li,.nav>li>a{position:relative;display:block}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.nav{padding-left:0;list-style:none}.nav>li>a{padding:10px 15px}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a{color:#fff;background-color:#428bca}.jumbotron,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.container:after,.container:before,.nav:after,.nav:before,.row:after,.row:before{display:table;content:" "}.container:after,.nav:after,.row:after{clear:both}.pull-right{float:right!important}@-ms-viewport{width:device-width} + + + + + + + + diff --git a/test/expected/generateInline-external-minified2.html b/test/expected/generateInline-external-minified2.html index 47e4fc4c..b2894edd 100644 --- a/test/expected/generateInline-external-minified2.html +++ b/test/expected/generateInline-external-minified2.html @@ -9,18 +9,15 @@ - - - - + .header,.jumbotron{border-bottom:1px solid #e5e5e5}.btn,.jumbotron{text-align:center}body{padding-top:20px;padding-bottom:20px}.header,.marketing{padding-left:15px;padding-right:15px}.header h3{margin-top:0;margin-bottom:0;line-height:40px;padding-bottom:19px}.jumbotron .btn{font-size:21px;padding:14px 24px}.marketing{margin:40px 0}@media screen and (min-width:768px){.container{max-width:730px}.header,.marketing{padding-left:0;padding-right:0}.header{margin-bottom:30px}.jumbotron{border-bottom:0}}.col-lg-6,.container{padding-right:15px;padding-left:15px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:62.5%}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}a{background:0 0;color:#428bca;text-decoration:none}h1{margin:.67em 0;font-size:36px}h1,h3,h4{margin-bottom:10px;font-family:inherit;font-weight:500;line-height:1.1;color:inherit}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}h1,h3{margin-top:20px}h3{font-size:24px}h4{margin-top:10px;font-size:18px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}.text-muted{color:#999}ul{margin-top:0;margin-bottom:10px}.btn,.nav{margin-bottom:0}.container{margin-right:auto;margin-left:auto}@media (min-width:768px){.lead{font-size:21px}.container{width:750px}}@media (min-width:992px){.container{width:970px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-6{position:relative;min-height:1px}@media (min-width:1200px){.container{width:1170px}.col-lg-6{float:left;width:50%}}.btn{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;white-space:nowrap;vertical-align:middle;background-image:none;border:1px solid transparent;border-radius:4px}.nav>li,.nav>li>a{position:relative;display:block}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.nav{padding-left:0;list-style:none}.nav>li>a{padding:10px 15px}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a{color:#fff;background-color:#428bca}.jumbotron,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.container:after,.container:before,.nav:after,.nav:before,.row:after,.row:before{display:table;content:" "}.container:after,.nav:after,.row:after{clear:both}.pull-right{float:right!important}@-ms-viewport{width:device-width} + + + + + + + + diff --git a/test/expected/generateInline-extract.html b/test/expected/generateInline-extract.html index 09edbd95..8c530485 100644 --- a/test/expected/generateInline-extract.html +++ b/test/expected/generateInline-extract.html @@ -9,16 +9,13 @@ - - - + .header,.jumbotron{border-bottom:1px solid #e5e5e5}.btn,.jumbotron{text-align:center}body{padding-top:20px;padding-bottom:20px}.header,.marketing{padding-left:15px;padding-right:15px}.header h3{margin-top:0;margin-bottom:0;line-height:40px;padding-bottom:19px}.jumbotron .btn{font-size:21px;padding:14px 24px}.marketing{margin:40px 0}@media screen and (min-width:768px){.container{max-width:730px}.header,.marketing{padding-left:0;padding-right:0}.header{margin-bottom:30px}.jumbotron{border-bottom:0}}.col-lg-6,.container{padding-right:15px;padding-left:15px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:62.5%}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}a{background:0 0;color:#428bca;text-decoration:none}h1{margin:.67em 0;font-size:36px}h1,h3,h4{margin-bottom:10px;font-family:inherit;font-weight:500;line-height:1.1;color:inherit}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}h1,h3{margin-top:20px}h3{font-size:24px}h4{margin-top:10px;font-size:18px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}.text-muted{color:#999}ul{margin-top:0;margin-bottom:10px}.btn,.nav{margin-bottom:0}.container{margin-right:auto;margin-left:auto}@media (min-width:768px){.lead{font-size:21px}.container{width:750px}}@media (min-width:992px){.container{width:970px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-6{position:relative;min-height:1px}@media (min-width:1200px){.container{width:1170px}.col-lg-6{float:left;width:50%}}.btn{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;white-space:nowrap;vertical-align:middle;background-image:none;border:1px solid transparent;border-radius:4px}.nav>li,.nav>li>a{position:relative;display:block}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.nav{padding-left:0;list-style:none}.nav>li>a{padding:10px 15px}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a{color:#fff;background-color:#428bca}.jumbotron,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.container:after,.container:before,.nav:after,.nav:before,.row:after,.row:before{display:table;content:" "}.container:after,.nav:after,.row:after{clear:both}.pull-right{float:right!important}@-ms-viewport{width:device-width} + + + + + + diff --git a/test/expected/generateInline-minified.html b/test/expected/generateInline-minified.html index 8e4c39c2..d31f72bc 100644 --- a/test/expected/generateInline-minified.html +++ b/test/expected/generateInline-minified.html @@ -9,16 +9,13 @@ - - - + .header,.jumbotron{border-bottom:1px solid #e5e5e5}.btn,.jumbotron{text-align:center}body{padding-top:20px;padding-bottom:20px}.header,.marketing{padding-left:15px;padding-right:15px}.header h3{margin-top:0;margin-bottom:0;line-height:40px;padding-bottom:19px}.jumbotron .btn{font-size:21px;padding:14px 24px}.marketing{margin:40px 0}@media screen and (min-width:768px){.container{max-width:730px}.header,.marketing{padding-left:0;padding-right:0}.header{margin-bottom:30px}.jumbotron{border-bottom:0}}.col-lg-6,.container{padding-right:15px;padding-left:15px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:62.5%}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}a{background:0 0;color:#428bca;text-decoration:none}h1{margin:.67em 0;font-size:36px}h1,h3,h4{margin-bottom:10px;font-family:inherit;font-weight:500;line-height:1.1;color:inherit}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}h1,h3{margin-top:20px}h3{font-size:24px}h4{margin-top:10px;font-size:18px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}.text-muted{color:#999}ul{margin-top:0;margin-bottom:10px}.btn,.nav{margin-bottom:0}.container{margin-right:auto;margin-left:auto}@media (min-width:768px){.lead{font-size:21px}.container{width:750px}}@media (min-width:992px){.container{width:970px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-6{position:relative;min-height:1px}@media (min-width:1200px){.container{width:1170px}.col-lg-6{float:left;width:50%}}.btn{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;white-space:nowrap;vertical-align:middle;background-image:none;border:1px solid transparent;border-radius:4px}.nav>li,.nav>li>a{position:relative;display:block}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.nav{padding-left:0;list-style:none}.nav>li>a{padding:10px 15px}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a{color:#fff;background-color:#428bca}.jumbotron,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.container:after,.container:before,.nav:after,.nav:before,.row:after,.row:before{display:table;content:" "}.container:after,.nav:after,.row:after{clear:both}.pull-right{float:right!important}@-ms-viewport{width:device-width} + + + + + + diff --git a/test/expected/generateInline-svg.html b/test/expected/generateInline-svg.html index 72357450..58736451 100644 --- a/test/expected/generateInline-svg.html +++ b/test/expected/generateInline-svg.html @@ -8,14 +8,11 @@ - - + .header,.jumbotron{border-bottom:1px solid #e5e5e5}.btn,.jumbotron{text-align:center}body{padding-top:20px;padding-bottom:20px}.header,.marketing{padding-left:15px;padding-right:15px}.header h3{margin-top:0;margin-bottom:0;line-height:40px;padding-bottom:19px}.jumbotron .btn{font-size:21px;padding:14px 24px}.marketing{margin:40px 0}@media screen and (min-width:768px){.container{max-width:730px}.header,.marketing{padding-left:0;padding-right:0}.header{margin-bottom:30px}.jumbotron{border-bottom:0}}.col-lg-6,.container{padding-right:15px;padding-left:15px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:62.5%}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}a{background:0 0;color:#428bca;text-decoration:none}h1{margin:.67em 0;font-size:36px}h1,h3,h4{margin-bottom:10px;font-family:inherit;font-weight:500;line-height:1.1;color:inherit}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}h1,h3{margin-top:20px}h3{font-size:24px}h4{margin-top:10px;font-size:18px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}.text-muted{color:#999}ul{margin-top:0;margin-bottom:10px}.btn,.nav{margin-bottom:0}.container{margin-right:auto;margin-left:auto}@media (min-width:768px){.lead{font-size:21px}.container{width:750px}}@media (min-width:992px){.container{width:970px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-6{position:relative;min-height:1px}@media (min-width:1200px){.container{width:1170px}.col-lg-6{float:left;width:50%}}.btn{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;white-space:nowrap;vertical-align:middle;background-image:none;border:1px solid transparent;border-radius:4px}.nav>li,.nav>li>a{position:relative;display:block}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.nav{padding-left:0;list-style:none}.nav>li>a{padding:10px 15px}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a{color:#fff;background-color:#428bca}.jumbotron,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.container:after,.container:before,.nav:after,.nav:before,.row:after,.row:before{display:table;content:" "}.container:after,.nav:after,.row:after{clear:both}.pull-right{float:right!important} + + + + diff --git a/test/expected/generateInline.html b/test/expected/generateInline.html index b0eccff3..9469b599 100644 --- a/test/expected/generateInline.html +++ b/test/expected/generateInline.html @@ -9,348 +9,345 @@ - - - + body { + padding-top: 20px; + padding-bottom: 20px; + } + + .header, + .marketing { + padding-left: 15px; + padding-right: 15px; + } + + .header { + border-bottom: 1px solid #e5e5e5; + } + + .header h3 { + margin-top: 0; + margin-bottom: 0; + line-height: 40px; + padding-bottom: 19px; + } + + .jumbotron { + text-align: center; + border-bottom: 1px solid #e5e5e5; + } + + .jumbotron .btn { + font-size: 21px; + padding: 14px 24px; + } + + .marketing { + margin: 40px 0; + } + + @media screen and (min-width: 768px) { + .container { + max-width: 730px; + } + + .header, + .marketing { + padding-left: 0; + padding-right: 0; + } + + .header { + margin-bottom: 30px; + } + + .jumbotron { + border-bottom: 0; + } + } + + html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + } + + body { + margin: 0; + } + + a { + background: transparent; + } + + h1 { + margin: .67em 0; + font-size: 2em; + } + + * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + *:before, + *:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + html { + font-size: 62.5%; + } + + body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42857143; + color: #333; + background-color: #fff; + } + + a { + color: #428bca; + text-decoration: none; + } + + h1, + h3, + h4 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; + } + + h1, + h3 { + margin-top: 20px; + margin-bottom: 10px; + } + + h4 { + margin-top: 10px; + margin-bottom: 10px; + } + + h1 { + font-size: 36px; + } + + h3 { + font-size: 24px; + } + + h4 { + font-size: 18px; + } + + p { + margin: 0 0 10px; + } + + .lead { + margin-bottom: 20px; + font-size: 16px; + font-weight: 200; + line-height: 1.4; + } + + @media (min-width: 768px) { + .lead { + font-size: 21px; + } + } + + .text-muted { + color: #999; + } + + ul { + margin-top: 0; + margin-bottom: 10px; + } + + .container { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; + } + + @media (min-width: 768px) { + .container { + width: 750px; + } + } + + @media (min-width: 992px) { + .container { + width: 970px; + } + } + + @media (min-width: 1200px) { + .container { + width: 1170px; + } + } + + .row { + margin-right: -15px; + margin-left: -15px; + } + + .col-lg-6 { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; + } + + @media (min-width: 1200px) { + .col-lg-6 { + float: left; + } + + .col-lg-6 { + width: 50%; + } + } + + .btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; + } + + .btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; + } + + .btn-lg { + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; + } + + .nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; + } + + .nav > li { + position: relative; + display: block; + } + + .nav > li > a { + position: relative; + display: block; + padding: 10px 15px; + } + + .nav-pills > li { + float: left; + } + + .nav-pills > li > a { + border-radius: 4px; + } + + .nav-pills > li + li { + margin-left: 2px; + } + + .nav-pills > li.active > a { + color: #fff; + background-color: #428bca; + } + + .jumbotron { + padding: 30px; + margin-bottom: 30px; + color: inherit; + background-color: #eee; + } + + .jumbotron h1 { + color: inherit; + } + + .jumbotron p { + margin-bottom: 15px; + font-size: 21px; + font-weight: 200; + } + + .container .jumbotron { + border-radius: 6px; + } + + @media screen and (min-width: 768px) { + .jumbotron { + padding-top: 48px; + padding-bottom: 48px; + } + + .container .jumbotron { + padding-right: 60px; + padding-left: 60px; + } + + .jumbotron h1 { + font-size: 63px; + } + } + + .container:before, + .container:after, + .row:before, + .row:after, + .nav:before, + .nav:after { + display: table; + content: " "; + } + + .container:after, + .row:after, + .nav:after { + clear: both; + } + + .pull-right { + float: right !important; + } + + @-ms-viewport { + width: device-width; + } + + + + + + + diff --git a/test/expected/streams-default.html b/test/expected/streams-default.html index 5ef254f5..a4e88887 100644 --- a/test/expected/streams-default.html +++ b/test/expected/streams-default.html @@ -9,71 +9,68 @@ - - - + body { + padding-top: 20px; + padding-bottom: 20px; + } + + .header, + .marketing { + padding-left: 15px; + padding-right: 15px; + } + + .header { + border-bottom: 1px solid #e5e5e5; + } + + .header h3 { + margin-top: 0; + margin-bottom: 0; + line-height: 40px; + padding-bottom: 19px; + } + + .jumbotron { + text-align: center; + border-bottom: 1px solid #e5e5e5; + } + + .jumbotron .btn { + font-size: 21px; + padding: 14px 24px; + } + + .marketing { + margin: 40px 0; + } + + @media screen and (min-width: 768px) { + .container { + max-width: 730px; + } + + .header, + .marketing { + padding-left: 0; + padding-right: 0; + } + + .header { + margin-bottom: 30px; + } + + .jumbotron { + border-bottom: 0; + } + } + + + + + + + From 014bff37d09dd8beb196a93df21b3330d4304cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Z=C3=B6rb?= Date: Sat, 11 Jun 2016 22:52:49 +0200 Subject: [PATCH 3/5] cleanup --- cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.js b/cli.js index 3b9939e9..0bf02257 100755 --- a/cli.js +++ b/cli.js @@ -142,7 +142,7 @@ function run(data) { if (err) { error(err); } else { - process.stdout.write(val, process.exit); + process.stdout.write(val); } }); } catch (err) { From 3f6f21215f5b9de26d2b932daa4c78ceacd1f993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Z=C3=B6rb?= Date: Sat, 11 Jun 2016 23:27:53 +0200 Subject: [PATCH 4/5] fixed tests for node 6.2.1 --- test/05-cli.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/05-cli.js b/test/05-cli.js index a869802c..e81b72cd 100644 --- a/test/05-cli.js +++ b/test/05-cli.js @@ -51,6 +51,9 @@ describe('CLI', function () { var expected = fs.readFileSync(path.join(__dirname, 'expected/generate-default.css'), 'utf8'); cp.stdout.on('data', function (data) { + if (data instanceof Buffer) { + data = data.toString('utf8'); + } assert.strictEqual(nn(data), nn(expected)); done(); }); @@ -62,6 +65,9 @@ describe('CLI', function () { var expected = fs.readFileSync(path.join(__dirname, 'expected/generate-default.css'), 'utf8'); cp.stdout.on('data', function (data) { + if (data instanceof Buffer) { + data = data.toString('utf8'); + } assert.strictEqual(nn(data), nn(expected)); done(); }); From 26cb9bfa9e6f7c9a58735501046979ed92211545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Z=C3=B6rb?= Date: Sat, 11 Jun 2016 23:32:07 +0200 Subject: [PATCH 5/5] fixed tests for node 6.2.1 --- test/05-cli.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/05-cli.js b/test/05-cli.js index e81b72cd..9d2a564a 100644 --- a/test/05-cli.js +++ b/test/05-cli.js @@ -111,6 +111,9 @@ describe('CLI', function () { var expected = fs.readFileSync(path.join(__dirname, 'expected/generate-default.css'), 'utf8'); cp.stdout.on('data', function (data) { + if (data instanceof Buffer) { + data = data.toString('utf8'); + } assert.strictEqual(nn(data), nn(expected)); done(); });