Closed xaota closed 1 month ago
Hello @xaota,
As mentioned in the docs not all the features can be exposed directly from the CLI. Nonetheless groupBy
option can be used via the API, that can be invoked in a CLI-ish way, with the same rendering as if it was run from the CLI (thanks to skott/rendering
module).
So you can have
skott.mjs
import skott, { defaultConfig } from "skott";
// Should be imported as "skott/rendering" when being in a third-party context
import { Terminal } from "skott/rendering";
Terminal.renderTerminalApplication(
{
...defaultConfig,
groupBy: // insert you groupBy configuration here
},
{
displayMode: "graph",
exitCodeOnCircularDependencies: 1,
showCircularDependencies: true,
showUnusedDependencies: true,
showUnusedFiles: false,
watch: true
}
)
Then you can have a npm script such as "skott": "node skott.mjs"
and just run npm run skott
from your CLI
Closing this as the CLI won't be embedding groupBy option anytime soon, given that it's available using the API
Summary
skott-group-by-config.js
Details
Standard questions
Please answer these questions to help us investigate your issue more quickly: