Try to add packages in Atom Source code dir

I was trying to add packages in atom source code directory(e.g. atom-1.33.1\packages), but got errors when I built the source code
so does atom support this?

No, packages should go in .atom/packages.

If you mean you want to build Atom with additional embedded packages (not that I’m sure this even makes them load quicker), you’d have to look into the build process yourself, or maybe at how several packages have been migrated to that folder in the PR history.

Yes,I just want to build atom with additional embedded packages,because i have to open a new atom with safe mode in a normal opened atom.
So that in safe mode Atom,embedded packages will be working.

Why do you want safe mode? The idea behind that is to only have officially supported packages active, which adding your own to could lead to confusion.

I created a package to load a webpage in atom’s pane,using webview in electron,And make this webpage show as my package being loaded.
If atom has not been opened in safe mode,every new atom window I open will load the webpage,so it would be pointless.
I have tried some changes in source code,but got the error:
Generating pre-built less cache in C:\atom-1.33.1\out\app\less-compile-cache
throw error;
Error: variable @headerHeight is undefined

Any suggestions?

Make the page load conditionally, like when a command is run? I still don’t get how safe mode is the solution, over making it play nicely with the normal editor.

Activation hooks can be used to delay package loading until the specified commands are run.

1 Like