Comparing version 4.2.3 to 4.3.0
@@ -0,1 +1,5 @@ | ||
# 4.3.0 / 2018-06-01 | ||
* Adds `preserveKeyFrames` option | ||
# 4.2.3 / 2018-03-08 | ||
@@ -2,0 +6,0 @@ |
@@ -42,2 +42,3 @@ // Type definitions for Juice 3.0.0 | ||
preserveFontFaces?: boolean; | ||
preserveKeyFrames?: boolean; | ||
insertPreservedExtraCss?: boolean; | ||
@@ -44,0 +45,0 @@ applyWidthAttributes?: boolean; |
@@ -60,2 +60,6 @@ 'use strict'; | ||
coercion: JSON.parse }, | ||
'preserve-key-frames': { | ||
pMap: 'preserveKeyFrames', | ||
def: 'preserve key frames?', | ||
coercion: JSON.parse }, | ||
'apply-width-attributes': { | ||
@@ -62,0 +66,0 @@ pMap: 'applyWidthAttributes', |
@@ -60,3 +60,4 @@ 'use strict'; | ||
mediaQueries: options.preserveMediaQueries, | ||
fontFaces: options.preserveFontFaces | ||
fontFaces: options.preserveFontFaces, | ||
keyFrames: options.preserveKeyFrames | ||
}); | ||
@@ -350,3 +351,4 @@ if (preservedText) { | ||
mediaQueries: options.preserveMediaQueries, | ||
fontFaces: options.preserveFontFaces | ||
fontFaces: options.preserveFontFaces, | ||
keyFrames: options.preserveKeyFrames | ||
}); | ||
@@ -353,0 +355,0 @@ if (preservedText) { |
@@ -96,3 +96,4 @@ 'use strict'; | ||
if ((options.fontFaces && rules[i].type === 'font-face') || | ||
(options.mediaQueries && rules[i].type === 'media')) { | ||
(options.mediaQueries && rules[i].type === 'media') || | ||
(options.keyFrames && rules[i].type === 'keyframes')) { | ||
preserved.unshift( | ||
@@ -160,2 +161,3 @@ mensch.stringify( | ||
preserveFontFaces: true, | ||
preserveKeyFrames: true, | ||
applyWidthAttributes: true, | ||
@@ -162,0 +164,0 @@ applyHeightAttributes: true, |
{ | ||
"name": "juice", | ||
"version": "4.2.3", | ||
"version": "4.3.0", | ||
"description": "Inlines css into html source", | ||
@@ -32,8 +32,8 @@ "bin": "bin/juice", | ||
"cheerio": "^0.22.0", | ||
"commander": "2.9.0", | ||
"cross-spawn": "^5.0.1", | ||
"commander": "^2.9.0", | ||
"cross-spawn": "^5.1.0", | ||
"deep-extend": "^0.5.0", | ||
"mensch": "^0.3.3", | ||
"slick": "1.12.2", | ||
"web-resource-inliner": "^4.2.0" | ||
"slick": "^1.12.2", | ||
"web-resource-inliner": "^4.2.1" | ||
}, | ||
@@ -40,0 +40,0 @@ "devDependencies": { |
@@ -37,2 +37,3 @@ [![Build Status](https://travis-ci.org/Automattic/juice.svg?branch=master)](https://travis-ci.org/Automattic/juice) | ||
* [notifme-template][10] - A Node.js library to easily handle all your notification (`emails` | `SMS` | `pushes` | `webpushes`) templates. (can be used in combination with [`notifme-sdk`][11]). | ||
* [mosaico][13] - The first opensource email template editor. Helps you build responsive and appealing email templates in few clicks. | ||
* [mjml][12] - A markup language designed for painless responsive email coding. The markup gets transpiled to HTML that works in any email client. | ||
@@ -52,2 +53,3 @@ | ||
[12]: https://github.com/mjmlio/mjml | ||
[13]: https://github.com/voidlabs/mosaico | ||
@@ -72,3 +74,3 @@ ## Documentation | ||
* `insertPreservedExtraCss` - whether to insert into the document any preserved `@media` or `@font-face` content from `extraCss` when using `preserveMediaQueries` or `preserveFontFaces`. When `true` order of preference to append the `<style>` element is into `head`, then `body`, then at the end of the document. When a `string` the value is treated as a CSS/jQuery/cheerio selector, and when found, the `<style>` tag will be appended to the end of the first match. Defaults to `true`. | ||
* `insertPreservedExtraCss` - whether to insert into the document any preserved `@media` or `@font-face` content from `extraCss` when using `preserveMediaQueries`, `preserveFontFaces` or `preserveKeyFrames`. When `true` order of preference to append the `<style>` element is into `head`, then `body`, then at the end of the document. When a `string` the value is treated as a CSS/jQuery/cheerio selector, and when found, the `<style>` tag will be appended to the end of the first match. Defaults to `true`. | ||
@@ -83,2 +85,4 @@ * `inlinePseudoElements` - Whether to insert pseudo elements (`::before` and `::after`) as `<span>` into the DOM. *Note*: Inserting pseudo elements will modify the DOM and may conflict with CSS selectors elsewhere on the page (e.g., `:last-child`). | ||
* `preserveKeyFrames` - preserves all key frames within `<style></style>` tags as a refinement when `removeStyleTags` is `true`. Other styles are removed. Defaults to `true`. | ||
* `removeStyleTags` - whether to remove the original `<style></style>` tags after (possibly) inlining the css from them. Defaults to `true`. | ||
@@ -85,0 +89,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
1241404
29422
239
+ Addedcommander@2.20.3(transitive)
- Removedcommander@2.9.0(transitive)
- Removedgraceful-readlink@1.0.1(transitive)
Updatedcommander@^2.9.0
Updatedcross-spawn@^5.1.0
Updatedslick@^1.12.2
Updatedweb-resource-inliner@^4.2.1