diff --git a/index.js b/index.js index aac1b55..cc54f93 100644 --- a/index.js +++ b/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)); }); diff --git a/package.json b/package.json index 5b991b9..7691bee 100644 --- a/package.json +++ b/package.json @@ -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" },