Rakefile 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. require 'rubygems'
  2. require 'bundler'
  3. begin
  4. Bundler.setup(:default, :development)
  5. rescue Bundler::BundlerError => e
  6. $stderr.puts e.message
  7. $stderr.puts "Run `bundle install` to install missing gems"
  8. exit e.status_code
  9. end
  10. require 'rake'
  11. require 'jeweler'
  12. Jeweler::Tasks.new do |gem|
  13. # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
  14. gem.name = "uglifier"
  15. gem.summary = %Q{Ruby wrapper for UglifyJS JavaScript compressor}
  16. gem.email = "lautis@gmail.com"
  17. gem.homepage = "http://github.com/lautis/uglifier"
  18. gem.authors = ["Ville Lautanala"]
  19. end
  20. Jeweler::RubygemsDotOrgTasks.new
  21. require 'rspec/core'
  22. require 'rspec/core/rake_task'
  23. RSpec::Core::RakeTask.new(:spec) do |spec|
  24. spec.pattern = FileList['spec/**/*_spec.rb']
  25. end
  26. task :default => :spec
  27. require 'rdoc/task'
  28. Rake::RDocTask.new do |rdoc|
  29. version = File.exist?('VERSION') ? File.read('VERSION') : ""
  30. rdoc.rdoc_dir = 'rdoc'
  31. rdoc.title = "uglifier #{version}"
  32. rdoc.rdoc_files.include('README*')
  33. rdoc.rdoc_files.include('lib/**/*.rb')
  34. end