We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I love .tree() because it can represent nested dependencies:
.tree()
omelette('hello').tree({ cruel: ['world', 'moon'], beautiful: ['mars', 'pluto'] }).init();
However, it’d be great if it were possible to also dynamically create the top level via a callback:
omelette('hello').tree( async () => { const json = await /* ... */; return json; } ).init();
In my own code, I use the following workaround (TypeScript code):
const oml = omelette(BIN_NAME) as omelette.Instance & { compgen: number }; if (oml.compgen >= 0) { const tree: omelette.TreeValue = {}; const projectDir = process.cwd(); if (BookConfig.isProjectDir(projectDir)) { const bookConfig = BookConfig.fromDir(projectDir); for (const key of bookConfig.getOutputConfigKeys()) { tree[key] = ['--dry-run', '--replace']; } } oml.tree(tree).init(); return; // not really needed }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I love
.tree()
because it can represent nested dependencies:However, it’d be great if it were possible to also dynamically create the top level via a callback:
In my own code, I use the following workaround (TypeScript code):
The text was updated successfully, but these errors were encountered: