diff --git a/.gitignore b/.gitignore index 789e9d0d..2eb79755 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -parser.output \ No newline at end of file +parser.output +*.gem \ No newline at end of file diff --git a/README b/README new file mode 100644 index 00000000..e69de29b diff --git a/Rakefile b/Rakefile index 2d2fd8d3..fdc1f4ca 100644 --- a/Rakefile +++ b/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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/SYNTAX b/SYNTAX deleted file mode 100644 index cd788ee2..00000000 --- a/SYNTAX +++ /dev/null @@ -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 - - - - - diff --git a/TODO b/TODO index 93dbd7f7..8fc6ae7c 100644 --- a/TODO +++ b/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? diff --git a/coffee-script.gemspec b/coffee-script.gemspec new file mode 100644 index 00000000..6fcf2ea1 --- /dev/null +++ b/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 \ No newline at end of file