Browse files

built the first gem -- works just fine

  • Loading branch information...
1 parent 290aa25 commit c6f11fbfeb63a4a020bb74d737c290d018180442 @jashkenas committed Dec 16, 2009
Showing with 38 additions and 40 deletions.
  1. +2 −1 .gitignore
  2. 0 README
  3. +13 −9 Rakefile
  4. +0 −30 SYNTAX
  5. +2 −0 TODO
  6. +21 −0 coffee-script.gemspec
View
3 .gitignore
@@ -1 +1,2 @@
-parser.output
+parser.output
+*.gem
View
0 README
No changes.
View
22 Rakefile
@@ -3,13 +3,17 @@ task :build, :extra_args do |t, args|
sh "racc #{args[:extra_args]} -o lib/coffee_script/parser.rb lib/coffee_script/grammar.y"
end
+namespace :gem do
-# # Pipe compiled JS through JSLint.
-# puts "\n\n"
-# require 'open3'
-# stdin, stdout, stderr = Open3.popen3('jsl -nologo -stdin')
-# stdin.write(js)
-# stdin.close
-# puts stdout.read
-# stdout.close
-# stderr.close
+ desc 'Build and install the coffee-script gem'
+ task :install do
+ sh "gem build coffee-script.gemspec"
+ sh "sudo gem install #{Dir['*.gem'].join(' ')} --local --no-ri --no-rdoc"
+ end
+
+ desc 'Uninstall the coffee-script gem'
+ task :uninstall do
+ sh "sudo gem uninstall -x coffee-script"
+ end
+
+end
View
30 SYNTAX
@@ -1,30 +0,0 @@
-Every line is an expression. Multiple expressions on a single line can be
-separated by a ";" character.
-
-NUM: 1
- 1.0
-
-STRING: "hello"
- 'hello'
-
-OBJECT: {one : 1, two : 2}
-
-ARRAY: [1, 2, 3]
-
-CODE: a, b => a * b.
-
-IF: return x if x > 1
-
- if (x > 1) return x
-
-ASSIGN: a : b
-
-LOGICAL: x && y
- x and y
- x || y
- x or y
-
-
-
-
-
View
2 TODO
@@ -1,5 +1,7 @@
TODO:
+* Need *way* better syntax errors.
+
* Is it possible to close blocks (functions, ifs, trys) without an explicit
block delimiter or significant whitespace?
View
21 coffee-script.gemspec
@@ -0,0 +1,21 @@
+Gem::Specification.new do |s|
+ s.name = 'coffee-script'
+ s.version = '0.1.0' # Keep version in sync with coffee-script.rb
+ s.date = '2009-12-16'
+
+ s.homepage = "http://jashkenas.github.com/coffee-script/"
+ s.summary = "The CoffeeScript Compiler"
+ s.description = <<-EOS
+ ...
+ EOS
+
+ s.authors = ['Jeremy Ashkenas']
+ s.email = 'jashkenas@gmail.com'
+ s.rubyforge_project = 'coffee-script'
+ s.has_rdoc = false
+
+ s.require_paths = ['lib']
+ s.executables = ['coffee-script']
+
+ s.files = Dir['bin/*', 'examples/*', 'lib/**/*', 'coffee-script.gemspec', 'LICENSE', 'README']
+end

0 comments on commit c6f11fb

Please sign in to comment.