mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
13 lines
372 B
Ruby
13 lines
372 B
Ruby
# Creates a new PhoneGap/Android project from ./example
|
|
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
|
|
puts "Generated #{ to }"
|
|
end
|
|
end |