Closed ccorcos closed 8 years ago
Not sure what you're talkig about there. I'm saying that i have a command:
vorpal.command('my-command').action(/*...*/)
and I'd like to be able to run that command from a bash script.
@ccorcos, you can use vorpal.parse(process.argv)
to run a command given as an argument. Doing that only when -c
is given as a parameter should be quite easy thing to add to your own app. Adding it to Vorpal by default would require an unnecessary major version bump as someone might already be using it for their own app (and therefore being a breaking change).
awesome. .parse
should do it though! thanks
On Mon, Feb 29, 2016 at 2:29 PM, Ristomatti Airo notifications@github.com wrote:
@ccorcos https://github.com/ccorcos, you can use vorpal.parse(process.argv) to run the commands given as arguments. Doing that only when -c is given as a parameter should be quite easy thing to add to your own app. Adding it to Vorpal by default would require an unnecessary major version bump as someone might already be using it for their own app (and therefore being a breaking change).
— Reply to this email directly or view it on GitHub https://github.com/dthree/vorpal/issues/121#issuecomment-190428978.
@ristomatti nailed it. Closing this issue.
@ccorcos if you have any question on Vorpal, feel free to ask in Stack Overflow! I'm very fast to respond, among others, and it helps build the general knowledge base.
No. You do not ever close this issue because you haven't fixed the underlying problem as you know dthree.
Of course, if you edit the compiler you can force the compiler to run from bash but to force a compiler to run is completely wrong and will cause a huge number of problems for you down the line.
@GranularDetective your comments are not sequitur to the discussion. It honestly sounds like you're trolling, which will get you blocked.
You don't understand what I'm telling you or more likely you are pretending not to understand.
It would be cool if you could execute a command using the
-c
option just like in bash.node main.js -c "my-command"
It could also be cool if you could require the node file and run commands manually. This way we can share the CLI code.