Sha256: 4ea209d87e5eb60c283b4cdc58103ffd437b99687f3ca9c860f878a9c3f76fdb
Contents?: true
Size: 1.46 KB
Versions: 1
Compression:
Stored size: 1.46 KB
Contents
require 'rubygems' require 'rake' require 'lib/shuriken' begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.name = "shuriken" gem.summary = %Q{Simple Namespace support for JS + Other niceties, packaged as a Barista framework} gem.description = %Q{Simple Namespace support for JS + Other niceties, packaged as a Barista framework} gem.email = "sutto@sutto.net" gem.homepage = "http://github.com/Sutto/shuriken" gem.version = Shuriken::VERSION gem.authors = ["Darcy Laycock"] end Jeweler::GemcutterTasks.new rescue LoadError puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" end desc "Compiles the javascript from Coffeescript to Javascript" task :compile_scripts do Dir["coffeescripts/**/*.coffee"].each do |cs| output = File.dirname(cs).gsub("coffeescripts", "javascripts") system "coffee", "--no-wrap", "-o", output, "-c", cs end end task :test => :compile_scripts do require 'erb' template = ERB.new(File.read("tests/template.erb")) FileUtils.mkdir_p 'test-output' FileUtils.rm_rf 'test-output/*' Dir["tests/*.coffee"].each do |test| test_name = File.basename(test, ".coffee") $js_file = "#{test_name}.js" File.open("test-output/#{test_name}.html", "w+") do |f| f.write template.result end $js_file = nil system "coffee", "--no-wrap", "-o", "test-output", "-c", test end end task :watchr do system "watchr tests.watchr" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shuriken-0.2.1 | Rakefile |