-
Notifications
You must be signed in to change notification settings - Fork 0
/
juice.js
33 lines (28 loc) · 866 Bytes
/
juice.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const juice = require('juice')
const fs = require('fs')
// juice(html, options)
juice.juiceFile('dist/index.html', {
applyAttributesTableElements: false,
applyHeightAttributes: false,
applyWidthAttributes: false,
applyStyleTags: true,
extraCss: '',
inlinePseudoElements: false,
preserveFontFaces: true,
preserveImportant: true,
preserveMediaQueries: true,
removeStyleTags: true,
webResources: {},
xmlMode: false,
widthElements: [],
heightElements: [],
tableElements: [],
nonVisualElements: [],
excludedProperties: [],
}, function(err, html) {
if (err) return console.log(err)
fs.writeFile('dist/index.html', '<!-- Template Name: Ghost Follow Up -->' + html, function(err) {
if (err) return console.log(err)
console.log('Juice: style inlining completed.')
})
})