diff --git a/src/render_import_unix.js b/src/render_import_unix.js index c6c4f6f..d2022d1 100644 --- a/src/render_import_unix.js +++ b/src/render_import_unix.js @@ -1,7 +1,7 @@ 'use strict'; // sharp has to be required before node-canvas on linux. see https://github.com/lovell/sharp/issues/371 -import sharp from 'sharp'; +import sharp from 'sharp'; import { createCanvas, Image } from 'canvas'; -export {sharp, createCanvas, Image}; +export { sharp, createCanvas, Image }; diff --git a/src/render_import_windows.js b/src/render_import_windows.js index 56e60f9..6698f4a 100644 --- a/src/render_import_windows.js +++ b/src/render_import_windows.js @@ -2,6 +2,6 @@ // sharp has to be required after node-canvas on windows. see https://github.com/Automattic/node-canvas/issues/2155#issuecomment-1487190125 import { createCanvas, Image } from 'canvas'; -import sharp from 'sharp'; +import sharp from 'sharp'; -export {sharp, createCanvas, Image}; +export { sharp, createCanvas, Image }; diff --git a/src/serve_rendered.js b/src/serve_rendered.js index 14ca114..9b66e39 100644 --- a/src/serve_rendered.js +++ b/src/serve_rendered.js @@ -18,9 +18,11 @@ import proj4 from 'proj4'; import request from 'request'; import { getFontsPbf, getTileUrls, fixTileJSONCenter } from './utils.js'; -import Os from 'os' -const ostype = (Os.platform() == 'win32') ? "windows":"unix"; -const { sharp, createCanvas, Image } = await import(`./render_import_${ostype}.js`); +import Os from 'os'; +const ostype = Os.platform() == 'win32' ? 'windows' : 'unix'; +const { sharp, createCanvas, Image } = await import( + `./render_import_${ostype}.js` +); const FLOAT_PATTERN = '[+-]?(?:\\d+|\\d+.?\\d+)'; const PATH_PATTERN =