Rakefile in less-0.8.13 vs Rakefile in less-1.0.4

- old
+ new

@@ -1,11 +1,11 @@ begin require 'jeweler' Jeweler::Tasks.new do |s| s.name = "less" s.authors = ["cloudhead"] - s.email = "alexis@cloudhead.net" + s.email = "self@cloudhead.net" s.summary = "LESS compiler" s.homepage = "http://www.lesscss.org" s.description = "LESS is leaner CSS" s.rubyforge_project = 'less' end @@ -15,11 +15,10 @@ # rubyforge begin require 'rake/contrib/sshpublisher' namespace :rubyforge do - desc "Release gem and RDoc documentation to RubyForge" task :release => ["rubyforge:release:gem", "rubyforge:release:docs"] namespace :release do desc "Publish RDoc to RubyForge." @@ -56,6 +55,25 @@ t.spec_files = FileList['spec/**/*_spec.rb'] t.spec_opts = ['--color'] t.rcov = true t.rcov_opts = ['--exclude', '^spec,/gems/'] end -end \ No newline at end of file +end + +begin + require 'lib/less' + + task :compile do + puts "compiling #{LESS_GRAMMAR.split('/').last}..." + File.open(LESS_PARSER, 'w') {|f| f.write Treetop::Compiler::GrammarCompiler.new.ruby_source(LESS_GRAMMAR) } + end + + task :benchmark do + print "benchmarking... " + less = File.read("spec/less/big-1.0.less") + start = Time.now.to_f + Less::Engine.new(less).parse + total = Time.now.to_f - start + puts "#{total}s" + end +end +