Chrome Editor Tweaking Source


#1

I’m tweaking Atom source using Chrome Inspector (the compiled JS). Since my changes wouldn’t persist when I reload Atom, I saved my changes locally. However, when I reload Atom, it wouldn’t load the files that I have made change to.

Specifically, I made some change to cursor.js, and saved the changes by Right Click -> Save, and now it doesn’t show up in the source


I went to the folder in my terminal and the cursor.js file is there with atom.js, babel.js, etc, with same permission.
What should I do?

And, BTW, if I change some coffee file locally, is there a way to only compile only those coffee files, so that I can do some quick testing?


#3

Are the original files that are in Atom, JS or CS files? If they are CS files then changing the JS files won’t show up in atom. I am probably not understanding correctly,

The good old coffee -c command line will do that nicely. There are also several atom packages to manage compiling CS.


#4

You should start by taking a look at the instructions for Building Atom for your OS. It looks like you’re using OS X. If so, the instructions for Building Atom on OS X are here:

https://github.com/atom/atom/blob/master/docs/build-instructions/os-x.md


#5

Are the original files that are in Atom, JS or CS files? If they are CS files then changing the JS files won’t show up in atom. I am probably not understanding correctly,

JS files. I use the inspector to do minor tweak & debug.

if I change some coffee file locally, is there a way to only compile only those coffee files

Thanks. I guess I’ll write a grunt script for that. (git ls-files for coffee files in src, then use compiled JS to replace the installed Atom).


#6

You should refer to the documentation first for the proper way to build Atom from source. As my mom would say, “You’re going the long way around the barn.”


#7

You’re going the long way around the barn

And you’re going to lose your work when Atom updates.


#8

Yeah, but I don’t want to build the whole source for every small change I make.

I want to start contributing to Atom, but now I’m still trying to figure out how Atom works exactly. Sometimes I need to tweak the source and see how Atom behave. I used to be editing directly on Chrome Inspector but changes won’t persist after a restart/reload, that’s why I want to make changes to coffee source and only build them.

I’m wondering how Github developers work on Atom. Say someone want to add a quick console.log to prove his thinking is right. Does he add the line to the coffee src and build Atom in whole?


#9

Right, but these are just small changes I make to see how Atom works. It’s not like bug fixes.


#10

I’m not a GitHub developer, but yes … that’s how I work on Atom. I never touch the compiled JS output. More specifically, I write a test for the behavior I want and run the tests, watch it fail, then fix it so the test passes. I only need to do a full build if I’m going to launch the application.


#11

OK, thanks!