From d850d734739fb115e6bea94fe3ed09b7fa9edb81 Mon Sep 17 00:00:00 2001 From: Talon Poole Date: Wed, 24 Feb 2021 15:41:43 +0000 Subject: [PATCH] parse --css better --- cli.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli.js b/cli.js index b90d05e..3b7744d 100755 --- a/cli.js +++ b/cli.js @@ -81,8 +81,7 @@ const cli = yargs(process.argv.slice(2)) }, }); -// TODO: checks for any .css arg, instead of parsing --css -const css = process.argv.find((arg) => /\.css$/.test(arg)) || "gmi-web.css"; +const css = yargs(process.argv.slice(2)).exitProcess(false).argv.css || "gmi-web.css"; const CSS_VARS = CSS.rootVariables(CSS.load({ css })); Object.keys(CSS_VARS).forEach((key) => { const opt = key.replace("--", "");