6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/entityjs/commands/eunit.rb', line 6
def self.generate(name=nil)
if name.is_a? Array
name = name.first
end
name ||= self.eunit_name
puts "Collecting test src files"
min = Entityjs::Build.compile_eunit
puts "Minifying"
license = "/* QUnit V1.5.0pre with EntityJS Entensions | http://docs.jquery.com/QUnit */\n"
min = Entityjs::Build.minify(min, :license=>license)
File.open(name, 'w') do |f|
f.write(min)
end
puts "Done!"
puts "File is at"
puts " ./#{name}"
return 0
end
|