diff --git a/lib/asset.js b/lib/asset.js
index <HASH>..<HASH> 100644
--- a/lib/asset.js
+++ b/lib/asset.js
@@ -186,8 +186,10 @@ ${content}`
         );
       }
 
-      const header = this.template.header && `${this.template.header}\n`;
-      const footer = this.template.footer && `\n${this.template.footer}`;
+      const header =
+        this.template.header && `${this.template.header}${str.EOL}`;
+      const footer =
+        this.template.footer && `${str.EOL}${this.template.footer}`;
       const enclosedContent = str.append(
         str.prepend(replacedContent, header),
         footer
diff --git a/lib/string.js b/lib/string.js
index <HASH>..<HASH> 100644
--- a/lib/string.js
+++ b/lib/string.js
@@ -1,5 +1,7 @@
 "use strict";
 
+const EOL = require("os").EOL;
+
 exports.trimTrailing = (source, value) => {
   const regex = new RegExp(`\\${value}+$`);
   return source.replace(regex, "");
@@ -26,3 +28,5 @@ exports.keepSingle = (source, value) => {
 exports.merge = function() {
   return [].join.call(arguments, "");
 };
+
+exports.EOL = EOL;
EOL constant for env newline