Class: Coolstrap::Generator::CLI
- Inherits:
-
Thor
- Object
- Thor
- Coolstrap::Generator::CLI
show all
- Includes:
- Utils
- Defined in:
- lib/coolstrap-generator/cli.rb
Constant Summary
collapse
- STATUS_TYPES =
{:success => 0,
:general_error => 1,
:not_supported => 3,
:not_found => 4,
:incorrect_usage => 64,
}
Instance Method Summary
collapse
Methods included from Utils
#base_location, #create_directories, #create_new_file, #create_with_template, #error, #get_app_name, #log, #remove_directories, #remove_files, #templates, #touch, #underscore
Instance Method Details
#build ⇒ Object
64
65
66
67
|
# File 'lib/coolstrap-generator/cli.rb', line 64
def build
system "echo ::== COOLSTRAP BUILD =="
system "middleman build"
end
|
#generate(type, name) ⇒ Object
#new(name, device_id = 'org.mycompany.demo', platform = 'iphone') ⇒ Object
32
33
34
|
# File 'lib/coolstrap-generator/cli.rb', line 32
def new(name, device_id='org.mycompany.demo', platform='iphone')
::Coolstrap::Generator::Generate::Project.create(name, device_id, platform)
end
|
#scaffold(cs_type, domain, name) ⇒ Object
38
39
40
41
42
43
|
# File 'lib/coolstrap-generator/cli.rb', line 38
def scaffold(cs_type, domain, name)
::Coolstrap::Generator::Generate::View.create(name, {
:domain => domain,
:cs_type => cs_type,
:name => name })
end
|
#server ⇒ Object
57
58
59
60
|
# File 'lib/coolstrap-generator/cli.rb', line 57
def server
system "echo == :::COOLSTRAP STARTING::: =="
system "bundle exec middleman server"
end
|