Skip to content

Commit

Permalink
Merge pull request coreyhaines#5 from docwhat/coffeescript
Browse files Browse the repository at this point in the history
CoffeeScript starting point
  • Loading branch information
coreyhaines committed Nov 11, 2011
2 parents f14c36d + c119fd4 commit fe9fef1
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
9 changes: 9 additions & 0 deletions starting_points/coffeescript/README.md
@@ -0,0 +1,9 @@
## Simple CoffeScript Setup using QUnit

To run testsuites just open coderetreat.html in a capable browser.

You have access to `CoffeeScript.compile(string_of_coffeescript)` to try things out via [firebug](http://getfirebug.com/) or the built-in webkit console.

# See Also:
* [CoffeeScript](http://jashkenas.github.com/coffee-script)
* [QUnit](http://docs.jquery.com/QUnit)
7 changes: 7 additions & 0 deletions starting_points/coffeescript/coderetreat.coffee
@@ -0,0 +1,7 @@
# Note: All code run below is running in a closure.
#
# This means that to make a variable global, you must assign it to `window`.
#
# See http://jashkenas.github.com/coffee-script/#scripts for more info
window.foo = ->
return "qix";
22 changes: 22 additions & 0 deletions starting_points/coffeescript/coderetreat.html
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>coderetreat Test Suite</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen"/>
<script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>
<script type="text/javascript" src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"></script>
<!-- Your project file goes here -->
<script type="text/coffeescript" src="coderetreat.coffee"></script>
<!-- Your tests file goes here -->
<script type="text/coffeescript" src="coderetreatTest.coffee"></script>
</head>
<body>
<h1 id="qunit-header">coderetreat</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">test markup, will be hidden</div>
</body>
</html>
2 changes: 2 additions & 0 deletions starting_points/coffeescript/coderetreatTest.coffee
@@ -0,0 +1,2 @@
test 'is foo "bar" ?', ->
equals foo(), "bar"

0 comments on commit fe9fef1

Please sign in to comment.