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

master
Lucas Azzola 2018-02-09 21:31:48 +11:00 committed by GitHub
parent 47714f5d4b
commit 7b2349dcd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

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") {