Building Modified Atom Code


#1

I’m currently working on a project that involves stripping atom of many of its core features and adding a few customizations. I essentially want to code and distribute a minimal version of atom with a few non-standard features and a slightly modified GUI.

I’ve forked and cloned the atom repo, run script/bootstrap to install dependencies. At this point atom is not installed and I am not able to run atom in any form (if that’s incorrect, please let me know). I can run script/build to build the source code which outputs a bunch of files into the /out directory: (app atom-1.29.0-dev-ba96165-amd64 atom-amd64.deb startup.js symbols). In order to create an executable file I have to add the --create-debian-package flag to script/build. Once I’ve built the source code and the installable file, I can install atom (dpkg -i atom-amd64.deb) and see the modifications I’ve made to the source code.

This workflow - modify source code, rebuild, and reinstall - seems overly cumbersome and in fact, there’s a section in the atom docs titled ‘Hacking on Atom Core’ which says that if I run atom in dev mode and point it to the directory where I’m storing atom’s source code, I should be able to make modifications to that source code and see them in atom without running the build script.

Some background - I’m a web developer with limited knowledge of building native code from source so if I’m way off base about any of my ideas, please let me know.


#2

Everything you’ve said sounds correct according to my understanding, so much so that I’m unsure what you’re having difficulty with.


#3

Am I misunderstanding the point of dev mode? Will it allow me to make changes to the source code and see those updates reflected in atom without rebuilding? Or do I have to rebuild every time.


#4

You’re not misunderstanding. If you set up your environment as stated in the documentation, you should be able to load your development code while in dev mode. None of the code that makes Atom Atom is written in a language that requires precompilation. It’s all JavaScript, just packed into an archive file. If it doesn’t work as expected, let us know and we can help you figure out why.