css-inliner
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -0,1 +1,10 @@ | ||
1.1.2 - 2015-10-20 | ||
================== | ||
- Fixed failing on at-rules that are no media queries. | ||
- You can now inline Buffer. | ||
1.1.1 - 2015-10-15 | ||
@@ -2,0 +11,0 @@ ================== |
@@ -134,3 +134,9 @@ // The CSS inliner. | ||
const context = this._context; | ||
return context.set('html', html).set('filename', filename); | ||
return Promise.resolve(html) | ||
.then(function(html) { | ||
return context | ||
.set('html', html.toString()) | ||
.set('filename', filename); | ||
}); | ||
} | ||
@@ -137,0 +143,0 @@ |
@@ -70,4 +70,5 @@ // This stage filters out CSS rules, keeping only the dynamic rules, so they | ||
function importantizeAtRule(atRule) { | ||
const rules = atRule.nodes.map(importantizeRule); | ||
return atRule.clone({ nodes: rules }); | ||
const nodes = atRule.nodes; | ||
const important = nodes && nodes.map(importantizeRule); | ||
return atRule.clone({ nodes: important }); | ||
} | ||
@@ -74,0 +75,0 @@ |
{ | ||
"name": "css-inliner", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -12,4 +12,4 @@ 'use strict'; | ||
it('should produce inlined document', function() { | ||
const html = File.readFileSync(`${__dirname}/inline.html`, 'utf-8'); | ||
const expected = File.readFileSync(`${__dirname}/inline.expected.html`, 'utf-8'); | ||
const html = File.readFileSync(`${__dirname}/inline.html`); | ||
const expected = File.readFileSync(`${__dirname}/inline.expected.html`); | ||
return inliner | ||
@@ -16,0 +16,0 @@ .inlineCSSAsync(html) |
@@ -13,3 +13,3 @@ 'use strict'; | ||
const html = File.readFileSync(`${__dirname}/email.html`, 'utf8'); | ||
const html = File.readFileSync(`${__dirname}/email.html`); | ||
const directory = __dirname; | ||
@@ -16,0 +16,0 @@ const template = CSSInliner.handlebars; |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
123844
56
3007
1