Hi all, I’m excited to poke around and contribute to Atom, but I’m having trouble getting a good development flow going, so it would be helpful to learn best practices from those who know The Way. Here are some examples of problems that I have encountered.
Hacking on text-buffer
I want to try messing around with text-buffer. I tried running
apm develop text-buffer, but that yields the following error:
Request for package information failed: Not Found. I suspect this has to do with
text-buffer being part of
package.json rather than
apm develop is not an option, what is the best way to test changes to
text-buffer? Do I need to clone the repo, edit the
.coffee files, generate the
.js, and then overwrite the
node_modules/text-buffer directory under Atom every time I make a change? It seems doable, but tedious.
Hacking on tree-view
Having found the docs on contributing to official Atom packages, I decided I would at least try editing code for which there appears to be a development flow. I ran
apm develop tree-view and edited
~/github/tree-view/lib/tree-view.coffee, adding an
alert('Hello!') after the
super call in
TreeView.initialize(). Then I ran
atom --dev as per the instructions, and huzzah, my alert box appeared! However, I then hit
cmd-\ to toggle the tree view to try to get my alert to appear again, but it did not (presumably because my
TreeView is cached, which makes sense). To see a change, I needed to close my window (via
cmd-shift-w), modify my source, and start Atom again via
atom --dev. Is this the most efficient way? Because Atom is built on web technologies, I was hoping for a more seamless edit-refresh cycle: is there one?
Because so much of the code is written CoffeeScript, and because
git grep has been rendered mostly useless. Is there a good way to get a more complete view of Atom’s source, particularly for searching?