normalize newlines

This commit is contained in:
Ben Zörb 2014-11-25 23:15:48 +01:00
parent b2211ab00b
commit 4f8fea67ff
2 changed files with 3 additions and 1 deletions

View File

@ -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));
});

View File

@ -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"
},