mirror of
https://github.com/danog/inline-critical.git
synced 2025-01-22 22:02:44 +01:00
normalize newlines
This commit is contained in:
parent
b2211ab00b
commit
4f8fea67ff
3
index.js
3
index.js
@ -17,6 +17,7 @@ var reaver = require('reaver');
|
||||
var cheerio = require('cheerio');
|
||||
var CleanCSS = require('clean-css');
|
||||
var slash = require('slash');
|
||||
var normalizeNewline = require('normalize-newline');
|
||||
|
||||
/**
|
||||
* Fixup slashes in file paths for windows
|
||||
@ -56,7 +57,7 @@ module.exports = function(html, styles, options) {
|
||||
if (!fs.existsSync(file)) {
|
||||
return;
|
||||
}
|
||||
var diff = cave(file, { css: styles });
|
||||
var diff = normalizeNewline(cave(file, { css: styles }));
|
||||
fs.writeFileSync(reaver.rev(file, diff), diff);
|
||||
return normalizePath(reaver.rev(href, diff));
|
||||
});
|
||||
|
@ -22,6 +22,7 @@
|
||||
"cave": "^2.0.0",
|
||||
"cheerio": "^0.17.0",
|
||||
"clean-css": "^2.2.12",
|
||||
"normalize-newline": "^1.0.1",
|
||||
"reaver": "^1.2.0",
|
||||
"slash": "^1.0.0"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user