Set os.EOL in worker.js (#3935)

This commit is contained in:
Lucas Azzola authored and GitHub committed 2018-02-09 21:31:48 +11:00
1 parent 47714f5d4b
commit 7b2349dcd2
1 file changed
+4 -2
+4 -2
View File
@@ -2,6 +2,7 @@
/* eslint no-var: off, strict: off */
// "Polyfills" in order for all the code to run
/* eslint-disable */
self.global = self;
self.util = {};
self.path = {};
@@ -17,13 +18,12 @@ self.Buffer = {
}
};
self.constants = {};
// eslint-disable-next-line
module$1 = module = os = crypto = {};
self.fs = { readFile: function() {} };
// eslint-disable-next-line no-undef
os.homedir = function() {
return "/home/prettier";
};
os.EOL = '\n';
self.process = {
argv: [],
env: { PRETTIER_DEBUG: true },
@@ -56,6 +56,8 @@ self.require = function require(path) {
return self[path];
};
/* eslint-enable */
var prettier;
importScripts("lib/index.js");
if (typeof prettier === "undefined") {