Open fuads96 opened 2 years ago
I have an application:
$ node src/app.js myapp~$ init --username fuads96 --password 12345678 App is ready. myapp/@fuads96~$
The problem here is every time I change my source code, I have to exit current vorpal instance and restart it with the same command again.
How to restart automatically?
perhaps I need something like nodemon for node.
nodemon
node
I created a new pull request to add a new option named once to the vorpal.parse() method to solve this problem.
once
vorpal.parse()
Then we can use nodemon to watch destination source code and restart vorpal app with the init command:
init
vorpal .parse(process.argv, { once: true }) .show();
// package.json ... scripts: { "start": "nodemon --watch dist --exec \"init --username fuads96 --password 12345678\" " }
I have an application:
The problem here is every time I change my source code, I have to exit current vorpal instance and restart it with the same command again.
How to restart automatically?
SOLUTION
I created a new pull request to add a new option named
once
to thevorpal.parse()
method to solve this problem.Then we can use
nodemon
to watch destination source code and restart vorpal app with theinit
command: