How to load packages in atom after it starts?


#1

How can I load some of the Packages that are not required immediately after atom starts i.e. the ditor’s window opens?

Such as :- zen pigments markdown-preview etc.

I would like these packages to load after atom starts, as they add significant startup time and are not used immediately after startup.


#2

Packages can do that themselves, by adding activationCommands in package.json.


#3

Well HOW??
Do i add that command to every package.json file and what do i add in the property??


#4

No, package authors should do this. You can submit an issue/pull request on the package’s repository if it doesn’t already do so. Any manual changes you make to a package will be overwritten when that package is upgraded.


#5

By the way, even if a package doesn’t use activationCommands it can still defer initialization and loading by using custom code, which the markdown-preview package already does:

This defers the largest parts of the initialization and loading until after you try to open the view.