Project

mercury

0.01
No commit activity in last 3 years
No release in over 3 years
Hack with haml, sass, jquery and coffee-script!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
>= 3.0.0
>= 0
>= 1.0.0
 Project Readme

Mercury ¶ ↑

What is it?¶ ↑

It is a command line application that allows you to create and run web sites built using haml, sass, jquery, and coffee-script. It also has support for markdown built right in. Give it a try, it only takes 5 minutes to get up and running.

Technology¶ ↑

  • haml

  • sass

  • coffee-script

  • markdown

Why¶ ↑

At Jack Russell Software, we love haml, jquery, etc and needed to create web mockups or wireframes quickly to get user interface feedback during our storyboarding process. Mercury was the answer, it allows us to work with the same tools we are familar with and focus on getting the user interface right.

Simply type:

mercury {your project name}

And you are ready to start writing haml, sass, and jquery. No configuration or setup, just start creating.

To run a mercury app:

cd into your project folder and type:

mercury

Keeping it this simple allows users to start building right away!

Install¶ ↑

gem install mercury

Create a mercury project¶ ↑

# Create a new folder for your project

mercury {project}

# Create your haml files

cd {project}

cd wwwroot

touch test.haml

¶ ↑

# then create a haml page

touch test.haml

¶ ↑

#header
  %h1 Widget

%h1 Welcome to Mercury

%p
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit sapien, ultricies id pulvinar euismod, pharetra accumsan nisl. Phasellus at ante neque, ut gravida massa. Mauris dapibus dolor nec nibh pellentesque cursus. Nullam quis mauris sed augue tempus cursus at vel purus. Cras suscipit augue eget leo tincidunt tempus. Curabitur imperdiet risus et diam vestibulum dictum. Sed id erat quis tellus consectetur tristique sit amet ut orci. Phasellus malesuada dui sit amet tortor tincidunt quis molestie justo elementum. In hac habitasse platea dictumst. Suspendisse pharetra facilisis dolor ut tincidunt. Donec rhoncus viverra sem, eu lobortis eros facilisis eu. Nam fringilla vehicula diam gravida consectetur. Donec tincidunt, diam sed pharetra accumsan, urna quam malesuada nibh, id malesuada mauris est vel mauris. Proin lacus magna, facilisis vel pulvinar sed, suscipit malesuada metus. Nam semper mattis pharetra. Quisque et mattis eros.

Run Server¶ ↑

# cd back to the root directory

cd ..

# run

mercury

# now navigate to localhost:9292

And you should see you index page with a link to your test.haml form

Using Sass¶ ↑

# Create your sass file

!x = blue
.profile
  color = !x

# save test.sass

# now in your haml file simply 

= sass :test

Using Javascript¶ ↑

# Create you js file

$(function() {
  alert('this rocks!');
})

# save test.js

# now in your haml file simply

= javascript :test

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 Jack Russell Software Company. See LICENSE for details.