How to deactivate my package?


Maybe this is a really stupid question, but I can’t seem to find the way:

How do I deactivate my package? Is there something like deactivationCommands, just like activationCommands? Thing is that that I have this “stop” notion and I want it to deactivate my plugin so that only the activationCommand is available.


atom.packages.deactivatePackage seems to do it, but it also removes my activationCommands entirely. I need to reload atom to get it back…


There isn’t anything like what you’re talking about built in to Atom, you’ll probably have to build some sort of support for this concept directly into your package and not use activationCommands. You can look at my tabs-to-spaces package to see an example of on-demand loading. Unloading might be a little more complicated :see_no_evil: