Skip to content
This repository

Minor typo in Rakefile. #50

Open
wants to merge 2 commits into from

2 participants

Diwank Singh Tomer Adrian Holovaty
Diwank Singh Tomer

Minor typo in Rakefile:
Changed this

def generate(page, template = "site/page.ms")
  Mustache.render(
    File.read(template),
    page.merge(:content => RDiscount.new(File.read(page[:src])).to_html),
  )
end

(Note the , at the end of the third last line)
to

def generate(page, template = "site/page.ms")
  Mustache.render(
    File.read(template),
    page.merge(:content => RDiscount.new(File.read(page[:src])).to_html)
  )
end
adrianholovaty and others added some commits
Adrian Holovaty adrianholovaty Rebasing (woot!)
Signed-off-by: Diwank Singh <diwank.singh@gmail.com>
859b5d0
Diwank Singh Tomer creatorrr Fixed typo in Rakefile.
Signed-off-by: Diwank Singh <diwank.singh@gmail.com>
91670d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 2 authors.

Aug 29, 2012
Adrian Holovaty adrianholovaty Rebasing (woot!)
Signed-off-by: Diwank Singh <diwank.singh@gmail.com>
859b5d0
Diwank Singh Tomer creatorrr Fixed typo in Rakefile.
Signed-off-by: Diwank Singh <diwank.singh@gmail.com>
91670d8
This page is out of date. Refresh to see the latest.
4 coffeescript/06_applications.html
@@ -87,7 +87,7 @@
87 87 express = require("express")
88 88 argv = process.argv.slice(2)
89 89
90   -package = stitch.createPackage(
  90 +pckg = stitch.createPackage(
91 91 # Specify the paths you want Stitch to automatically bundle up
92 92 paths: [ __dirname + "/app" ]
93 93
@@ -102,7 +102,7 @@
102 102 app.set "views", __dirname + "/views"
103 103 app.use app.router
104 104 app.use express.static(__dirname + "/public")
105   - app.get "/application.js", package.createServer()
  105 + app.get "/application.js", pckg.createServer()
106 106
107 107 port = argv[0] or process.env.PORT or 9294
108 108 console.log "Starting server on port: #{port}"
4 coffeescript/07_the_bad_parts.html
@@ -85,7 +85,7 @@
85 85 })();
86 86 </code></pre>
87 87
88   -<p>Notice how CoffeeScript initializes variables (using <code>var</code>) automatically in the context their first used. Whilst it's impossible to shadow outer variables, you can still refer to and access them. You need to watch out for this, be careful that you're not reusing the name of an external variable accidentally if you're writing a deeply nested function or class. For example, here we're accidentally overwriting the <code>package</code> variable in a Class function:</p>
  88 +<p>Notice how CoffeeScript initializes variables (using <code>var</code>) automatically in the context they're first used. Whilst it's impossible to shadow outer variables, you can still refer to and access them. You need to watch out for this, be careful that you're not reusing the name of an external variable accidentally if you're writing a deeply nested function or class. For example, here we're accidentally overwriting the <code>package</code> variable in a Class function:</p>
89 89
90 90 <p><span class="csscript"></span></p>
91 91
@@ -491,7 +491,7 @@
491 491 class window.Spine
492 492 </code></pre>
493 493
494   -<p>Whilst I recommend enabling strict mode, but it's worth noting that script mode doesn't enable any new features that aren't ready possible in JavaScript, and will actually slow down your code a bit by having the VM do more checks at runtime. You may want to develop with strict mode, and deploy to production without it.</p>
  494 +<p>Whilst I recommend enabling strict mode, but it's worth noting that strict mode doesn't enable any new features that aren't ready possible in JavaScript, and will actually slow down your code a bit by having the VM do more checks at runtime. You may want to develop with strict mode, and deploy to production without it.</p>
495 495
496 496 <h2>JavaScript Lint</h2>
497 497
4 coffeescript/Rakefile
@@ -6,7 +6,7 @@ require "fileutils"
6 6 def generate(page, template = "site/page.ms")
7 7 Mustache.render(
8 8 File.read(template),
9   - page.merge(:content => RDiscount.new(File.read(page[:src])).to_html),
  9 + page.merge(:content => RDiscount.new(File.read(page[:src])).to_html)
10 10 )
11 11 end
12 12
@@ -41,4 +41,4 @@ task :generate do
41 41 end
42 42 end
43 43
44   -task :default => :generate
  44 +task :default => :generate
10 coffeescript/all.html
@@ -47,7 +47,7 @@
47 47
48 48 <p>One of the easiest ways to initially play around with the library is to use it right inside the browser. Navigate to <a href="http://coffeescript.org">http://coffeescript.org</a> and click on the <em>Try CoffeeScript</em> tab. The site uses a browser version of the CoffeeScript compiler, converting any CoffeeScript typed inside the left panel to JavaScript in the right panel.</p>
49 49
50   -<p>You can also convert JavaScript back to CoffeeScript using the <a href="http://js2coffee.org/">js2coffee</a> project, especially useful when migration JavaScript projects to CoffeeScript.</p>
  50 +<p>You can also convert JavaScript back to CoffeeScript using the <a href="http://js2coffee.org/">js2coffee</a> project, especially useful when migrating JavaScript projects to CoffeeScript.</p>
51 51
52 52 <p>In fact, you can use the browser-based CoffeeScript compiler yourself, by including <a href="http://jashkenas.github.com/coffee-script/extras/coffee-script.js">this script</a> in a page, marking up any CoffeeScript script tags with the correct <code>type</code>.</p>
53 53
@@ -1252,7 +1252,7 @@
1252 1252 express = require("express")
1253 1253 argv = process.argv.slice(2)
1254 1254
1255   -package = stitch.createPackage(
  1255 +pckg = stitch.createPackage(
1256 1256 # Specify the paths you want Stitch to automatically bundle up
1257 1257 paths: [ __dirname + "/app" ]
1258 1258
@@ -1267,7 +1267,7 @@
1267 1267 app.set "views", __dirname + "/views"
1268 1268 app.use app.router
1269 1269 app.use express.static(__dirname + "/public")
1270   - app.get "/application.js", package.createServer()
  1270 + app.get "/application.js", pckg.createServer()
1271 1271
1272 1272 port = argv[0] or process.env.PORT or 9294
1273 1273 console.log "Starting server on port: #{port}"
@@ -1546,7 +1546,7 @@
1546 1546 })();
1547 1547 </code></pre>
1548 1548
1549   -<p>Notice how CoffeeScript initializes variables (using <code>var</code>) automatically in the context their first used. Whilst it's impossible to shadow outer variables, you can still refer to and access them. You need to watch out for this, be careful that you're not reusing the name of an external variable accidentally if you're writing a deeply nested function or class. For example, here we're accidentally overwriting the <code>package</code> variable in a Class function:</p>
  1549 +<p>Notice how CoffeeScript initializes variables (using <code>var</code>) automatically in the context they're first used. Whilst it's impossible to shadow outer variables, you can still refer to and access them. You need to watch out for this, be careful that you're not reusing the name of an external variable accidentally if you're writing a deeply nested function or class. For example, here we're accidentally overwriting the <code>package</code> variable in a Class function:</p>
1550 1550
1551 1551 <p><span class="csscript"></span></p>
1552 1552
@@ -1952,7 +1952,7 @@
1952 1952 class window.Spine
1953 1953 </code></pre>
1954 1954
1955   -<p>Whilst I recommend enabling strict mode, but it's worth noting that script mode doesn't enable any new features that aren't ready possible in JavaScript, and will actually slow down your code a bit by having the VM do more checks at runtime. You may want to develop with strict mode, and deploy to production without it.</p>
  1955 +<p>Whilst I recommend enabling strict mode, but it's worth noting that strict mode doesn't enable any new features that aren't ready possible in JavaScript, and will actually slow down your code a bit by having the VM do more checks at runtime. You may want to develop with strict mode, and deploy to production without it.</p>
1956 1956
1957 1957 <h2>JavaScript Lint</h2>
1958 1958
6 coffeescript/chapters/06_applications.md
Source Rendered
@@ -60,7 +60,7 @@ Now to actually boot up the Stitch server. Let's create a file called `index.cof
60 60 express = require("express")
61 61 argv = process.argv.slice(2)
62 62
63   - package = stitch.createPackage(
  63 + pckg = stitch.createPackage(
64 64 # Specify the paths you want Stitch to automatically bundle up
65 65 paths: [ __dirname + "/app" ]
66 66
@@ -75,7 +75,7 @@ Now to actually boot up the Stitch server. Let's create a file called `index.cof
75 75 app.set "views", __dirname + "/views"
76 76 app.use app.router
77 77 app.use express.static(__dirname + "/public")
78   - app.get "/application.js", package.createServer()
  78 + app.get "/application.js", pckg.createServer()
79 79
80 80 port = argv[0] or process.env.PORT or 9294
81 81 console.log "Starting server on port: #{port}"
@@ -244,4 +244,4 @@ For example, when it comes to templating, you can use [Mustache](http://mustache
244 244
245 245 As for serving up application, [Hem](http://github.com/maccman/hem) is a great choice, supporting both CommonJS and NPM modules and integrating seamlessly with the CoffeeScript MVC framework [Spine](http://spinejs.com). [node-browsify](https://github.com/substack/node-browserify) is another similar project. Or if you want to go lower level with [express](http://expressjs.com/) integration, there's Trevor Burnham's [connect-assets](https://github.com/TrevorBurnham/connect-assets)
246 246
247   -You can find a full list of CoffeeScript web framework plugins, on the [project's wiki](https://github.com/jashkenas/coffee-script/wiki/Web-framework-plugins).
  247 +You can find a full list of CoffeeScript web framework plugins, on the [project's wiki](https://github.com/jashkenas/coffee-script/wiki/Web-framework-plugins).
6 coffeescript/index.html
@@ -14,12 +14,6 @@
14 14 <h1><a href="index.html">The Little Book on CoffeeScript</a></h1>
15 15 </header>
16 16
17   - <div id="notice">
18   - <p>An <a href="http://shop.oreilly.com/product/0636920024309.do">updated version of the book</a> is now available in Paperback, PDF and Kindle versions from O'Reilly.</p>
19   -
20   - <a href="http://shop.oreilly.com/product/0636920024309.do"><img src="site/covers.gif"></a>
21   - </div>
22   -
23 17 <div id="content">
24 18 <ol class="pages">
25 19 <li><a href="01_introduction.html">Introduction</a></li>

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.