Skip to content
clintjhill edited this page Jan 2, 2012 · 20 revisions

The fastest way to get started is to setup and use interpreted mode. This will parse/compile as you go - once your changes are all finalized and you are very comfortable using hitch, you might consider precompiling.

Setup (interpreted mode) ======================== Interpreted mode currently relies on JQuery 1.5 or greater. To get started, mark a link or style tag in your page with the -plugins-interpret attribute, include your preferred version of jQuery (we recommend using one of the existing CDNs) and the interpreted version of the library. It should look something like this:
<link rel="stylesheet" href="styles.css" type="text/css" -hitch-interpreted="true"  />
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"></script>	
<script type="text/javascript" src="hitch-interp-jquery.js"></script>

Setup (pre-compiled/production mode) ==================================== You can use the rulecompiler tool to create precompiled versions (very fast) for production. The output of the tool will show you what to include. In the end it will look something like this (note there are no dependencies in this version and the engine itself is <2k):
<link rel="stylesheet"  href="styles-compiled.css" type="text/css" />
<script type="text/javascript" src="hitch.js"></script>
<script type="text/javascript" src="myHitches.js"></script>
<script type="text/javascript" src="styles-compiled.js"></script>
Clone this wiki locally