by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 07 14:38
    huan commented #328
  • Jul 07 14:33
    hongaar commented #328
  • Jul 04 13:11
    sweethuman commented #328
  • Jul 04 12:31
    huan commented #328
  • Jul 03 06:08
    milesj closed #234
  • Jul 03 06:08
    milesj commented #234
  • Jul 02 12:27
    sweethuman commented #328
  • Jul 02 07:44
    huan commented #291
  • Jul 02 07:42
    huan commented #234
  • Jul 02 07:39
    huan commented #307
  • Jul 02 07:35
    huan commented #234
  • Jul 02 07:34
    huan commented #234
  • Jul 02 07:30
    huan commented #328
  • Jul 02 07:20
    huan opened #350
  • Jun 25 07:39
    cnaccio commented #117
  • Jun 25 07:36
    cnaccio commented #117
  • Jun 25 07:35
    cnaccio commented #117
  • Jun 17 11:57
    sweethuman commented #349
  • Jun 17 06:06
    M1178475702 opened #349
  • Apr 05 02:04
    sweethuman commented #343
Adrien Becchis
@AdrieanKhisbe

@hongaar

:wave: hi all. Is anybody aware if a coordinated attempt to keep vorpal alive?

Would you be open to be part of it? :)

Brandon Slinkard
@slinkardbrandon
I reserved a channel for Vorpal. Invite Link. I do worry that since the community is fairly small, I don't want to split us further or make it appear that there is no work in progress though.
Joram van den Boezem
@hongaar
@AdrieanKhisbe @slinkardbrandon yes let's do it! We recently looked at oclif, but decided to stay with vorpal for now because of its features. Very open to help with a revival!
Adrien Becchis
@AdrieanKhisbe
@hongaar Awesome! :)
Ore Landau
@Ore4444
Hi @AdrieanKhisbe @slinkardbrandon @hongaar
I moved my fork to the GitHub org @slinkardbrandon created.
@dthree created for us an open PR to their repo from branch 2.0-ts, so all work should be done on that branch. dthree/vorpal#328
@slinkardbrandon, I don't see your PR. Maybe it was removed when I migrated the repo to new org?
I think since the community is here, we should keep discussion in this Gitter. Might be nice to have a dedicated room dthree/vorpal-reforge for the effort.
_DRAFT__TypeScript_Vorpal_by_Ore4444_·_Pull_Request__328_·_dthree_vorpal.png
Brandon Slinkard
@slinkardbrandon
I think you don’t see my branch because I accidentally opened the PR to dthree’s 2.0-ts branch. I’ll see if I can get that fixed today. We did make the slack channel so we can get some integrations going but to prevent the team from getting split I think we need to remain vigilant of Gitter too.
Brandon Slinkard
@slinkardbrandon
We had a different Org set up vorpaljs-reforged that we ended up getting more people to join up with. I just made PRs from my org to the community with the larger org. I'll be sure to close mine down to prevent the segregation in the future.
Brandon Slinkard
@slinkardbrandon
I think as part of the reforge we should also replace mocha with jest 24
Brandon Slinkard
@slinkardbrandon
Made the PR to handle the jest conversion :)
Brandon Slinkard
@slinkardbrandon
After converting to jest and enabling coverage reporting I realized we have about 50% coverage. (Also none of the tests are using mocks, they’re mostly integration style tests). As a future PR we should start refactoring the tests to be actual unit tests and shoot for as close to 100% coverage as we can get without coding our src for our tests.
Brandon Slinkard
@slinkardbrandon
To draw attention to the above I also implemented coveralls with that PR.
kalks21
@kalks21
Hi!!
is possible with Vorpal command
connect to WS socket
and display "messages" in screen
but the command line available ?
is impossible "detach" the command... anyone can help me?
Jason Schwarzenberger
@master5o1
how to prevent the process.exit() from happening on .parse()?
also, how can i capture the output to a string rather than the console?
(context: i am trying to use this to build a command line for a telegram bot.)
Jason Schwarzenberger
@master5o1
i think i'm ok now.
Stramaz
@stramaz_twitter
Hello all, just a question. is it possible to run vorpal command that execute a background process/service, exiting from application/vorpal, connecting later again in a second and attach to the previous "process"?
I.e.: Running some vorpal commands (than running one or more background processes), exit from shell/ssh, connecting again running again the application and "reconnecting" so I can "resume" the UI and interact with the previous started processes? I hope I was clear. Thanks!
donaldej
@donaldej
You would likely want to use IPC/sockets to connect/re-connect with some long running process you have spawned.
Stramaz
@stramaz_twitter
Yes, something like this. For example, I run via vorpal command a bot (ie: a trading bot), a service in background, later on I can run again the vorpal application and interact with that service running other vorpal commands (see stats, check progress, stop bot, change configuration, restart it)
Paule Paul
@paule32
hello#
how can i embed vorpal in website?
Graham Holden
@TripeHound
Just started using Vorpal and got the basics in place... node myapp.js will open an interactive session and prompt for commands; node myapp.js mycmd myarg will run a command and return to the command-prompt. Is there a way of giving one or more commands on the command-line and then switching to accepting commands interactively? At the moment, after command-definition, I've got vorpal.parse( process.argv ).show() ;. TIA
Reservjesus
@grouchexmachina_twitter
So how dead is vorpal.js? Or is there a viable fork somewher
Robert Kraig
@robertkraig
is it possible to write a vorpal cli without being stuck in the event loop? like.. node cli.js mycommand:name --argument
Nokko
@nok-ko
hrrgh. why do my commands uh, say their name?
[nodemon] starting `node index.js`
listening on port 3000
op$ help
op$ help

  Commands:

    help [command...]  Provides help for a given command.
    exit               Exits application.
    say <message>      Sends a `serverchat` to the connected clients.

op$
the second help isn't me typing it in
eugh
Katharsis
@yakuzadave
Quick question. I was looking to have the commands separated into their own files and stored in a "commands" folder. Has anyone found a good way to do this?
Katharsis
@yakuzadave
Never mind, I figured out an easy way. Just used require-all and _.forOwn with vorpal.use
const commands = require('require-all')(__dirname + '/commands');
const _ = require("lodash")
_.forOwn(commands, function(value, key) {
  vorpal.use(value)
});
Joe Pea
@trusktr
Does Vorpal not have a way to do that automatically based on the command specified via the CLI? (I'm new here). Importing all the commands all at once is less performant than just importing the specific command that the user wants to execute. It will evaluate all the modules instead of just one. With various alternatives to Vorpal (commander.js, Caporal, sywac, etc) I've noticed much speed up in just importing specific modules only.
@yakuzadave ^
Katharsis
@yakuzadave
Well, I thought that I could do vorpal.use(commands) but it wasn't liking that way, so I used this method and it requires much less setup.

each command just follows this format:

module.exports = function(vorpal, options){
    // insert vorpal command here
}
was following this bit of the docs as a guide:
https://github.com/dthree/vorpal/wiki/Docs-%7C-Creating-Extensions
Ido Samuelson
@isamuelson
is there a way to have a default option defined?
Joe Pea
@trusktr
@yakuzadave I just looked at the require-all package, and as I suspected, it requires all things at once. This will be bad for performance (more noticeable the bigger the CLI gets).
Ideally, if the CLI has three commands a, b, and c, then running the-cli a only imports and executes code from a.js while never touching files for b and c (or similar).
Now imagine the CLI has hundreds of commands, or commands with many options that import logic from different files.

But I suppose you can mitigate it by doing this (based on your snippet of code)

module.exports = function(vorpal, options){
    const dep = require('dependency-needed-by-your-command')
    dep.foo()
}

instead of

const dep = require('dependency-needed-by-your-command')

module.exports = function(vorpal, options){  
    dep.foo()
}

Each command imports all of its dependencies only when called.

But if you move the require or import statements outside of the command functions, then it means when the index files loads all commands it will import every dependency for every command even if the commands aren't all used.