chore: lint

Signed-off-by: acalcutt <acalcutt@techidiots.net>
This commit is contained in:
acalcutt 2023-04-02 22:50:04 -04:00 committed by Andrew Calcutt
parent 31f0c5632e
commit 689576b168
3 changed files with 9 additions and 7 deletions

View file

@ -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 };

View file

@ -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 };

View file

@ -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 =