diff --git a/documentation/css/docs.css b/documentation/css/docs.css index b105dd83..9b455e45 100644 --- a/documentation/css/docs.css +++ b/documentation/css/docs.css @@ -43,7 +43,7 @@ table { td { padding: 9px 15px 9px 0; } -code, pre, tt { +code, pre, tt, textarea { font-family: Monaco, Consolas, "Lucida Console", monospace; font-size: 12px; line-height: 18px; @@ -75,7 +75,7 @@ div.code { position: absolute; right: 8px; bottom: 8px; } - div.code pre { + div.code pre, div.code textarea { float: left; width: 450px; border-left: 1px dotted #559; @@ -84,4 +84,15 @@ div.code { } div.code pre:first-child { border-left: 0; - } \ No newline at end of file + } + +#repl_source { + border: 0; + padding: 5px 7px; + margin-left: 5px; + height: 250px; + resize: none; +} +#repl_results { + height: 260px; +} \ No newline at end of file diff --git a/documentation/index.html.erb b/documentation/index.html.erb index 1d339828..70bb5d37 100644 --- a/documentation/index.html.erb +++ b/documentation/index.html.erb @@ -59,6 +59,7 @@
Mini Overview
Installation and Usage
+ Try CoffeeScript
Significant Whitespace
Functions and Invocation
Assignment
@@ -224,6 +225,25 @@ coffee --interactive
coffee --watch --lint experimental.coffee
coffee --print app/scripts/*.coffee > concatenation.js
+
+ Here's a live version of the CoffeeScript compiler, running within
+ your browser.
Hit the compile button to generate JavaScript
+ on the right-hand side.
+ You can also paste in any of the examples from below.
+
@@ -832,5 +852,18 @@ coffee --print app/scripts/*.coffee > concatenation.js + +