Sha256: 597d063356d9913e76b1b85d7d97176b711f0154415e64dc851fca365f03c211

Contents?: true

Size: 856 Bytes

Versions: 3

Compression:

Stored size: 856 Bytes

Contents

require 'rubygems'
require 'rake'
require 'rspec/core/rake_task'
require 'jasmine'
require 'coffee-script'
load 'jasmine/tasks/jasmine.rake'

desc "Run RSpec"
RSpec::Core::RakeTask.new do |t|
  t.verbose = false
end

task :default => [:compile_js, :spec, "jasmine:ci"]

def compile_coffee_script(file, path)
  source = File.read File.expand_path("#{path}/#{file}.coffee", __FILE__)
  compiled_path = File.expand_path("#{path}/compiled/", __FILE__)
  if !(File.exists?(compiled_path) && File.directory?(compiled_path))
    Dir.mkdir compiled_path
  end
  destination = File.open File.join(compiled_path, file), 'w+'
  destination.write CoffeeScript.compile(source)
end

desc "Compile coffeescript"
task :compile_js do
  compile_coffee_script('danthes.js', '../app/assets/javascripts')
  compile_coffee_script('danthes_spec.js', '../spec/coffeescripts')
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
danthes-1.0.3 Rakefile
danthes-1.0.2 Rakefile
danthes-1.0.1 Rakefile