Hi, I’d like to add some functionality to
markdown-preview package, so I fork it on Github, then, I found I have no idea where to go. Can there be a
load developing package button? (like Chrome extension which provides nice developing experience)
Hi, I’d like to add some functionality to
If you have your fork installed locally and your cwd is your package, than you can call
$ apm link. Than you can reload you Atom window and Atom knows about your package.
Does this solve your question?
The workflow - as far as I understand it - is:
apm develop <package_name>
First command clones the github repo into
~/github/<package_name> and links it to
~/.atom/dev/packages/<package_name>, second is obvious, and third runs atom in development mode in which it’s also loading ‘development’ packages from
If you want to use your modified package in normal mode, too, simply link create a link to it in
You’ll of course need atom’s shell commands installed for all that.
atom -d also automatically reload plugins with changed code?
(I apologise for the dumb question, but I’m away from my Atom machine, otherwise I’d just tried myself.)
atom -d just opens up Atom in development mode. Meaning all packages in
~/.atom/dev/packages/ will be loaded.
If you already have Atom opened in developer mode and want to reload packages so you can test your changes. Just do
cmd-alt-shift-L. That will refresh Atom.
atom -d and
cmd-shift-o will open a new dev window.
Dev windows load packages from
~/.atom/dev/packages first, then
~/.atom/packages second, and from within
/Applications/Atom.app last. Dev windows do have automatic stylesheet reloading via the dev-live-reload package.
markdown-preview is in
~/.atom/dev/packages then new dev windows will load that version instead of the version that comes with Atom.
Just for clarity, another thing
apm develop does is run
apm install initially after cloning in the package’s root directory which installs all dependencies of that package into its local
node_modules folder. You can run
apm install anytime to install the package’s dependencies again.
There is also
apm unlink to remove the symlink, see `apm help unlink for more details.
Thanks for the clarification.
Thanks for all your replies!
When I’ve used
apm dev it has put the new package into ~/github not ~/.atom/dev. Has that changed recently?
Does atom -d open all packages in ~/github also (it appears too)?
Are there docs on dev mode somewhere? Thanks.
I just discovered that ~/.atom/dev still exists and the packages inside are symlinks to ~/github. It would be very helpful if everything apm dev did was clear somewhere. Splitting Atoms might be a good place.
How about in the help?
[~/.atom] apm dev --help Usage: apm develop <package_name> Clone the given package's Git repository to ~/github/<package_name>, install its dependencies, and link it for development to ~/.atom/packages/dev/<package_name>. Once this command completes you can open a dev window from atom using cmd-shift-o to run the package out of the newly cloned repository. Options: --help, -h Print this usage message
atom -d worked for my package.
I’m having issues with it for vim-mode. Is there something else I have to do to turn vim mode on?
Also, is there away to quickly turn off all non-core packages so that it’s just the package I’m developing on and optional others (to isolate which package is causing issues etc)
While my package is dependent upon vim-mode, I really need to make sure it works well with it.
Oops. It seemed I had to restart everything and it’s working now.
Obviously this alone doesn’t accomplish the goal. Atom doesn’t load your plugin just because you linked it.
I wonder what’s the up to date doc page for this now…
I just cloned my repo inside ~/.atom/dev/packages, then atom -d loads it.
apm link command creates a symbolic link in your
.atom/packages/ folder pointing to the package you’re working on. If you use
apm link -d, the symbolic link is created in
.atom/dev/packages/. It’s not necessarily a problem to have your development code in
dev/, since you’ll know that it’s there, but you definitely wouldn’t want to keep it in
If you keep your code in a dedicated external folder, you can add that folder to Atom as the default project folder. Then any packages you spin up with
package-generator will have that directory filled in by default. It’s very convenient.