rake jasmine:build no longer builds docs; use default for that.

This commit is contained in:
Christian Williams 2009-11-26 10:41:10 -05:00
parent 4ebc3b5964
commit 2cb5bf146c
2 changed files with 24 additions and 12 deletions

View File

@ -3,6 +3,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), "spec/jasmine_helper.
def jasmine_sources
sources = ["src/base.js", "src/util.js", "src/Env.js", "src/Reporter.js", "src/Block.js"]
sources += Dir.glob('src/*.js').reject{|f| f == 'src/base.js' || sources.include?(f)}.sort
sources
end
def jasmine_filename(version)
@ -26,19 +27,32 @@ def start_jasmine_server(jasmine_includes = nil)
:jasmine_files => jasmine_includes)
end
task :default => 'jasmine:dist'
namespace :jasmine do
desc 'Prepares for distribution'
task :dist => ['jasmine:build', 'jasmine:doc']
desc 'Builds lib/jasmine from source'
task :build => 'jasmine:doc' do
task :build do
puts 'Building Jasmine from source'
require 'json'
sources = jasmine_sources
version = version_hash
old_jasmine_files = Dir.glob('lib/jasmine*.js')
old_jasmine_files.each do |file|
File.delete(file)
end
jasmine = File.new("lib/#{jasmine_filename version}", 'w')
jasmine.puts(File.read(sources.shift))
sources.each do |source_filename|
jasmine.puts(File.read(source_filename))
end
jasmine.puts %{
jasmine.version_= {
"major": #{version['major']},
@ -47,9 +61,7 @@ jasmine.version_= {
"revision": #{Time.now.to_i}
};
}
sources.each do |source_filename|
jasmine.puts(File.read(source_filename))
end
jasmine.close
end

View File

@ -539,13 +539,6 @@ jasmine.include = function(url, opt_global) {
return eval(xhr.responseText);
}
};
jasmine.version_= {
"major": 0,
"minor": 10,
"build": 0,
"revision": 1259249316
};
/**
* @namespace
*/
@ -2235,3 +2228,10 @@ window.clearInterval = function(timeoutKey) {
}
};
jasmine.version_= {
"major": 0,
"minor": 10,
"build": 0,
"revision": 1259250030
};