Open mke66djx opened 7 years ago
Is there a use case for multiple Vorpal instances?
Yes, in my case I have different user modes which each have their own command sets and workspaces. Vorpal was actually designed with this use case in mind.
Not sure is anyone is using any extensions because I dont see much activity here but it looks like simply running .use(cash) is generating an error;
...node_modules\vorpal\dist\history.js:146 this._localStorage.setItem(this._storageKey, JSON.stringify(persistedHistory));
TypeError: Converting circular structure to JSON
Is anyone else getting this to work?
Hi guys,very confusing- running the below seems to interfere with the main vorpal instance. I dont see how that's possible unless they use the same cache or other common files.
If you run the below and hit up and down you will see the history not working. Removing the cash import will fix the issue.
const Vorpal = require('vorpal'); const mainScreenVorpal = new Vorpal(); const cash = require('cash'); mainScreenVorpal .delimiter('home-mode~>') .history('mainScreenId') .show();