Same thoughts here, although I'll also add that @suda has identified cloud configuration selection (and hopefully, by extension, local compiles + uploads) as a future enhancement in Particle Dev: Option to select between Particle.io or local cloud to send OTA updates to devices · Issue #86 · particle-iot-archived/particle-dev · GitHub
While waiting for that to happen, I wrote an atom.io package to handle offline compiles+uploads for use with atom. I haven't tried installing my package within Particle Dev itself, but it should be possible, too.
It's not the cleanest solution, and there are issues related to the refresh/selection of the serial ports (especially if you work with multiple devices simultaneously), so ymmv!
(EDIT: finally fixed the atom.io package – you should now be able to install it directly from atom – search for the particle-local-compiler package)
If you're using atom, ensure you #include "application.h", use .cpp file extensions and your code should compile locally. Also, .cpp/.h libraries should be in the same folder as your main sketch. Finally, you'll have to declare your prototypes manually, either in a .h file or at the top of your main .cpp file.
If I get the time, I'll see to the cleaning up of the package and also testing it within Particle Dev.