mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
25 lines
781 B
Ruby
25 lines
781 B
Ruby
# ProjectName
|
|
# |
|
|
# |-tmp ......... Temporary directory for generated projects to launch into emulators or devices. Ignore.
|
|
# | '-android ... A generated Android project.
|
|
# |
|
|
# |-opt ......... Optional platform specific code. Plugins install native code here.
|
|
# | |-android ... Java files
|
|
# | '-iphone .... Objective C
|
|
# |
|
|
# |-bin ......... Generated applications.
|
|
# | '-android ... project.apk
|
|
# |
|
|
# '-www ......... html, css and javascript (optional config.xml for additional properties)
|
|
#
|
|
class Generate
|
|
def initialize(name)
|
|
if name.nil?
|
|
puts "You need to supply a name to generate a project. Try this:\n\ndroidgap gen MyApp\n\n"
|
|
return
|
|
end
|
|
from = File.join ROOT, "example"
|
|
to = File.join FileUtils.pwd, name
|
|
FileUtils.cp_r from, to
|
|
end
|
|
end |