32
questions
0
votes
0
answers
15
views
In Vorpal.js Auto complete will not work in option to search the file names
I like the some features in vorpal like Custom Delimiter, Banner and handling command and options. But auto-complete will not work for option to search the filesystem.
Eg:
Vorpal$ open -f ../[file-...
0
votes
5
answers
911
views
How to convert an input of type string into type object array in node js
I am creating a cli app & I get an input from the user : print [{name:'joe', age:19}] where arg = [{name:'joe', age:19}]
But when I do typeof arg, it returns string. I tried using json.parse [...
0
votes
1
answer
109
views
Log function not working in cli app using vorpal js
I am creating a cli app using node js & vorpal. There is no syntax error or warnings and everything works perfectly except that vorpal log doesn't work. Below is a small code snippet.
//...
26
votes
2
answers
27k
views
create nodejs cli select/options menu
How do you create an arrow-key menu list?
I'm looking for something like after entering in eslint init or create-react-app <project>? (see images below)
ESlint
yeoman
Searching around to ...
8
votes
1
answer
431
views
Vorpal Commands Context
I am working on a command line application based on Vorpal (http://vorpal.js.org/) and thus NodeJs.
I was wondering whether there was a way to allow (and list in the help) commands depending on a ...
1
vote
2
answers
458
views
Close Vorpal instance programmatically
This regards the vorpal CLI for node.js, like so:
const vorpal = require('vorpal')();
The user can close vorpal with Ctrl-C, but how can I close vorpal programmatically?
For example, if a vorpal ...
0
votes
1
answer
178
views
Reloading lorenwest's NodeJS config module
I need to reload the config lorenwests config module in multiple files if someone sends the reload command. To achieve that, I followed this issue but it didn't work out for me.
I'm working on NodeJS ...
0
votes
0
answers
153
views
Async.map in vorpal command line
I'm creating a command line in node js so I'm using Vorpal to do so but I have a problem when I try to use Async library (Async.map) so the command line never stops.
So here is my code:
First I use ...
0
votes
1
answer
137
views
calling another function during vorpal action
I have just started using Vorpal.js to help build a CLI tool which will ultimately preform a HTTP request against an API endpoint.
I have it asking questions and validating data input, but once I ...
1
vote
1
answer
1k
views
Vorpal - how to execute a command with a prompt
I'm currently using a 3rd party application that uses Vorpal in REPL mode. I'm trying to automate some deployment configuration for use in my project using the exec function in Vorpal. Everything is ...
1
vote
1
answer
314
views
How do I run code on exiting a Vorpal.js app?
I'm writing a vorpal.js app that loads a file on launch, and should write a modified version of the file on exit. How do I run code on exit? Is there some place I can attach a callback or something?
4
votes
1
answer
3k
views
Sequelize and Feathers: When Relationships Fall Apart
After two days of trying to figure out why my Sequelize models aren't committed to their relationships, I've decided it was time to ask y'all for advice.
Here's the story.
I'm writing a Feathers JS ...
3
votes
1
answer
457
views
How to separate commands into files Vorpal.js
I have many commands and each of them is long.
For example, I have:
create
read
update
delete
I want to put them in separate files:
./commands/create.js
./commands/read.js
./commands/update.js
./...
1
vote
1
answer
118
views
Vorpal very long parameter gets cut
I've created a Vorpal command:
vorpal.command('getURL <url>')
The problem is when i pass a very long URL it gets cut. I believe there is some restriction on the length of the parameter. Is ...
3
votes
2
answers
191
views
Is it possible to restart a Vorpal application from the Vorpal prompt?
Say we wanted to restart the Vorpal app from within the prompt.
Eg with a command:
> restart
I have tried different things including executing a shell script that kills the process and executes ...