parse --css better
This commit is contained in:
parent
ffcdff0ddc
commit
d850d73473
3
cli.js
3
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 = yargs(process.argv.slice(2)).exitProcess(false).argv.css || "gmi-web.css";
|
||||||
const css = process.argv.find((arg) => /\.css$/.test(arg)) || "gmi-web.css";
|
|
||||||
const CSS_VARS = CSS.rootVariables(CSS.load({ css }));
|
const CSS_VARS = CSS.rootVariables(CSS.load({ css }));
|
||||||
Object.keys(CSS_VARS).forEach((key) => {
|
Object.keys(CSS_VARS).forEach((key) => {
|
||||||
const opt = key.replace("--", "");
|
const opt = key.replace("--", "");
|
||||||
|
|
Loading…
Reference in a new issue