From 6e4ef5ba8d8337775f11745a3ea9d39b8cc26896 Mon Sep 17 00:00:00 2001 From: Lorenzo Rizzotti Date: Thu, 27 Apr 2023 22:00:58 +0000 Subject: [PATCH] feat: Implement customFlags (#140) --- src/cmdSwitches.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmdSwitches.js b/src/cmdSwitches.js index b4c458b..4f9d845 100644 --- a/src/cmdSwitches.js +++ b/src/cmdSwitches.js @@ -9,7 +9,8 @@ const presets = { module.exports = () => { let c = {}; - for (const x of ('base,' + (oaConfig.cmdPreset || 'perf')).split(',').reduce((a, x) => a.concat(presets[x]?.split(' ')), [])) { + const customFlags = oaConfig.customFlags ? oaConfig.customFlags.split(' ') : []; + for (const x of ('base,' + (oaConfig.cmdPreset || 'perf')).split(',').reduce((a, x) => a.concat(presets[x]?.split(' ')), customFlags)) { if (!x) continue; const [ k, v ] = x.split('=');