built the first gem -- works just fine
This commit is contained in:
parent
290aa257de
commit
c6f11fbfeb
|
@ -1 +1,2 @@
|
|||
parser.output
|
||||
parser.output
|
||||
*.gem
|
22
Rakefile
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
|
30
SYNTAX
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
TODO
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?
|
||||
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue