Custom stdin/stdout ? #123
-
Hello, Is it possible to use seeli with other input/output streams than Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
It depends on what you want to do I suppose. Admittedly, it was not something that I built for in the early days. Right now, if you want to sent output to something other than Lines 89 to 100 in a9d7caf Instead it will be handed to a content handler in which you can do something custom with your data new Command({
onContent: function(content) {
process.stderr.write(content.foo)
}
, run: async function(flags) {
return {foo: 'hello world'}
}
}) Its not impossible to change some of the internals of
It should be - I agree. If you have ideas, want to hash it out, or want to make an attempt at it, more than happy to help. |
Beta Was this translation helpful? Give feedback.
-
the internal as long as it has |
Beta Was this translation helpful? Give feedback.
It depends on what you want to do I suppose. Admittedly, it was not something that I built for in the early days.
Right now, if you want to sent output to something other than
stdout
you would have to handle this in a command. If your command returns something other than a string, seeli will not try to write it to stdout. The the entirety of that logic is herenode-seeli/lib/seeli.js
Lines 89 to 100 in a9d7caf