Reloaded.js
Reloaded is a development utility which aims to give you more control and inspection abilities directly from your favorite text editor. Change css and javascript and have those changes reflect in your web browser immediately, without refreshing.
Also, you can run whatever code snippets you want directly from your
editor and have them execute right in the browser session.
This is especially useful for CSS but even has some good use
for javascript, if you organize your code properly.
Getting Started
First off install reloaded, ideally through npm
npm install reloaded
Install the reloaded.js browser script and include it in your project.
reload install ./public/javascripts
...
<script src="/javascripts/reloaded.js"></script>
Start the server.
change directory to the project root of, say, your rails project. or if you are working outside of rails, to the web root directory.
reload start
Once the server is up, you should be able to do some goofy shit
Refresh The Browser
reload refresh
Running Javascripts by URL
reload js /javascripts/test.js
Adding CSS by URL
reload css /css/test.css
Put some JS in your pipe.
echo "alert('and smoke it');"|reload js
No one man should have all that power.
Add some stuff to your ~/.vimrc
reload vim
Now you can take css / javascript directly from your buffers / registers, etc and run them in the browser. The one caveat is that you want to have your current working directory for vim be the web root, unless you're using a framework we have set up detection for (e.g. rails ) ...
A lot more coming soon...
Inspecting, Debugging, you know how we do
Get At Me
- email: jonathan.soeder@gmail.com
- gtalk: jonathan.soeder@gmail.com
- twitter: @soederpop