forked from coreyhaines/coderetreat
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request coreyhaines#5 from docwhat/coffeescript
CoffeeScript starting point
- Loading branch information
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
test 'is foo "bar" ?', -> | |||
equals foo(), "bar" |