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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# File 'lib/entityjs/command.rb', line 11
def self.run(command, args=nil)
case command
when /^(new|n)$/
return Entityjs::New.generate(args)
when 'templates'
return Entityjs::Templates.generate(args)
when /^(build|b)$/
return Entityjs::Build.generate(args)
when /^(test|t)$/
return Entityjs::Test.generate(args)
when '/^(release|r)$/'
return Entityjs::Release.generate(args)
when 'eunit'
return Entityjs::Eunit.generate(args)
when 'min'
return Entityjs::Min.generate(args)
when /^(comp|c)$/
return Entityjs::Comp.generate(args)
when /^(server|s)$/
return Entityjs::Server.run(args)
when /^(font|f)$/
return Entityjs::Font.generate(args)
when /^(html)$/
return Entityjs::Html.generate(args)
when /^(version|v|-v)$/
puts 'EntityJS V'+Entityjs::VERSION
return 0
when /^(help|h|-h)$/
puts ""
puts '---- Commands ----'
puts 'new [name]'
puts 'new [name] [template]'
puts 'templates'
puts 'comp [name]'
puts 'test [name]'
puts 'test [name] [tests]+'
puts 'font [name] (soon...)'
puts 'release'
puts 'html'
puts 'build'
puts 'server'
puts 'help'
puts 'version'
return 0
end
return 1
end
|