ATTENTION: this piece of code is super experimental and can be so radioactive that it could break your Sublime! It's going to be amazing.
The aim is to:
Connect Sublime Text to Firefox Developer tools: live updating of HTML and CSS and reading the console logs directly from Sublime without any external tool, by using the super-powerful RDP (aka Remote Debugging Protocol). This allows us to edit CSS at runtime exactly as if we were using the Web Inspector in Firefox.
Use Sublime Text to deploy apps for FirefoxOS: while the new Firefox WebIDE is awesome, some developers might want to use their favourite editors.
$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
$ git clone https://github.com/mozilla/fireplay-sublime fireplay
Install the plugin by cloning into Sublime's plugin directory (as detailed above), then start Sublime Text.
cmd
+shift
+r
.Start new Firefox OS simulator instance
.cmd
+shift
+r
.manifest.webapp
file.cmd
+shift
+r
.When you are connected to your device and pushed the app at least once, saving HTML and JS files will trigger a complete app push. Editing CSS files will only reload the CSS.
This method is still experimental:
about:config
set devtools.debugger.remote-enabled
to trueabout:config
set devtools.debugger.prompt-connection
to falsefireplay.sublime-settings
and change
fireplay_firefox: false,
to
fireplay_firefox: true,
Tools
⟶ Web Developer
⟶ Developer toolbar
. A command line prompt will open at the bottom of the browser. Focus on it and type listen
, then press ENTER
.Unfortunately, you have to do that every time you close and reopen the browser as the setting is not remembered between sessions.
It's still early times, but you can help by testing this out and reporting issues. Or helping fix existing issues! We're specially interested in getting help for Windows support.
When reporting errors, it is often useful to attach the logs from the Sublime Text console. Go to the View menu and select Show Console
if it's not shown yet, then copy and paste the info in the console in the bug description.
Read INSPIRATIONS.md to satisfy your unnatural curiosity.