From e84a22b9c7a496a18ea126a739f85b8d16a01831 Mon Sep 17 00:00:00 2001 From: ninnka Date: Mon, 8 Jan 2024 16:40:05 +0800 Subject: [PATCH] feat: support custom imageoptim app path --- src/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index 6badf4b..99874d6 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -46,7 +46,7 @@ export const PNGQUANT_NUMBER_OF_COLORS = '256'; export const PNGQUANT_QUALITY = '65-80'; export const PNGQUANT_SPEED = '1'; export const PNGQUANT_BIN_PATH = '/Applications/ImageAlpha.app/Contents/MacOS/pngquant'; -export const IMAGEOPTIM_BIN_PATH = '/Applications/ImageOptim.app/Contents/MacOS/ImageOptim'; +export const IMAGEOPTIM_BIN_PATH = process.env.imageoptim_app || '/Applications/ImageOptim.app/Contents/MacOS/ImageOptim'; export const HOMEPAGE_URL = 'https://github.com/JamieMason/ImageOptim-CLI'; export const ASSISTIVE_DEVICES_URL = `${HOMEPAGE_URL}/#%EF%B8%8F-jpegmini-and-support-for-assistive-devices`;