Class: Jazz::AppGenerator
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Jazz::AppGenerator
show all
- Includes:
- AppDetector, Thor::Actions
- Defined in:
- lib/jazz/app_generator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#app_path, #generate_controller, #generate_db, #generate_glue, #generate_model, #generate_views, #new_app_path, #prefix, #public_path, #rack_app?
Class Method Details
.source_root ⇒ Object
10
11
12
|
# File 'lib/jazz/app_generator.rb', line 10
def self.source_root
File.join(File.dirname(__FILE__), '..', '..')
end
|
Instance Method Details
#build_the_app ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/jazz/app_generator.rb', line 18
def build_the_app
directory "templates/app_root", new_app_path
directory 'dist/jazz', "#{new_app_path}/lib/jazz"
directory 'dist/hashchange', "#{new_app_path}/vendor/hashchange"
directory 'dist/jquery', "#{new_app_path}/vendor/jquery"
directory 'dist/mustache', "#{new_app_path}/vendor/mustache"
directory 'dist/require', "#{new_app_path}/vendor/require"
directory 'dist/underscore', "#{new_app_path}/vendor/underscore"
template "templates/application.js", "#{new_app_path}/config/application.js"
template "templates/index.html", "#{new_app_path}/index.html"
end
|
#farewell ⇒ Object
32
33
34
|
# File 'lib/jazz/app_generator.rb', line 32
def farewell
$stdout.puts "Thank you for installing Jazz"
end
|
#greeting ⇒ Object
14
15
16
|
# File 'lib/jazz/app_generator.rb', line 14
def greeting
$stdout.puts "Creating new Jazz app #{name}"
end
|