My purpose is to disable a package from command pallet.
1- I create a command for command-palet on init.coffe file which runs this:
After this method, when I click settings–>packages, I can see that the mypackage1 is disabled. But the package runs on backgrund. Because when I run from command-pallet, a command of mypackage1, it works. After I call windows.reload I can not run a command of mypackage1. So I’m asking is there any way disable a package without windows.reload ?
2- I check https://github.com/robenkleene/toggle-packages package. (Like the first thing I wrote) It seems disable the mypackage1 but It needs windows.reload.
3- I check https://atom.io/packages/package-switch package. This one works. It disables the package without windows.reload.
Can somebody help me to write the simliest code block which I can call it from command line.
( Note: I can not use package-switch package. because it disables a package only from command-pallet in 2-3 choices (mouse clicks). But I need one command which can I add it to toolbar as button.)
Thanks in advance