Made a bunch of edits to Chapter 1 #33

Open
wants to merge 3 commits into
from

Projects

None yet

3 participants

@adrianholovaty

I apologize if this is too forward, but I made a bunch of edits to Chapter 1 of the CoffeeScript book. Most of the changes make the writing slightly tighter. If you guys like it, I can do the other chapters, too.

@maccman

Awesome, sorry to be a bore, but could you make the changes to the markdown? Thanks!

@adrianholovaty

Oh no, I didn't even notice the markdown. :-/ Sure, can do.

@adrianholovaty

Hey, I've made the changes to the markdown locally but I want to confirm they result in an identical HTML file, so I'm trying to run rake before committing. But I'm getting an error with rake that I'm not sure how to fix (I haven't used Ruby much). Any hints?

laptop:~/tmp/library/coffeescript$ rake --trace
(in /Users/adrian/tmp/library/coffeescript)
rake aborted!
/Users/adrian/tmp/library/coffeescript/Rakefile:10: syntax error, unexpected ')'
/Users/adrian/tmp/library/coffeescript/Rakefile:44: syntax error, unexpected $end, expecting kEND
task :default => :generate
                          ^
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2383:in `load'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2000:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:31

I'm running Ruby 1.8.7. Is it a Ruby version thing?

@maccman

Upgrade your ruby version to 1.9.2 - perhaps using rvm: http://beginrescueend.com/

@adrianholovaty

There ya go -- I updated the markdown to be consistent with those HTML changes. Markdown and HTML are in sync now.

@adrianholovaty

Any thoughts on whether you'll accept this? I'd be happy to do the remaining chapters but don't want to spend the time if you're not into the idea.

@creatorrr

Minor typo in Rakefile:
Change 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment