parse --css better

This commit is contained in:
Talon Poole 2021-02-24 15:41:43 +00:00
parent ffcdff0ddc
commit d850d73473

3
cli.js
View file

@ -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("--", "");