Open andys8 opened 6 years ago
Here's my current workaround for getting and caching elm-format
version in JS:
const execa = require("execa");
let cachedElmFormatVersion;
function getElmFormatVersion() {
if (!cachedElmFormatVersion) {
// a cleaner way of getting elm-format version
// will be possible when this issue is closed:
// https://github.com/avh4/elm-format/issues/425
const help = execa.sync("elm-format", ["--help"]).stdout;
cachedElmFormatVersion = help.match(/elm-format ([^\n]+)/)[1];
}
return cachedElmFormatVersion;
}
Is it me or is there no
-v
or--version
flag on the command line? I'd love to see it working in the expected way. I know it prints the version too, if there are no arguments.This would be great: