8
9
10
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
|
# File 'lib/commands/new.rb', line 8
def run(args=nil)
app_id = args[0]
if args.empty?
console.warn 'You need to specify a name for your new application'
return
end
if File.directory? app_id
if File.exist? "#{app_id}/nutella.json"
console.warn "An application named #{app_id} already exists"
return
else
console.warn "A directory named #{app_id} already exists"
return
end
end
create_dir_structure app_id
console.success "Your new nutella application #{app_id} is ready!"
end
|