helpful error messages when lein or pod are missing

This commit is contained in:
Dan Motzenbecker 2015-08-25 21:57:22 -04:00
parent b2eda4b11d
commit fc289940ea
1 changed files with 9 additions and 1 deletions

View File

@ -123,9 +123,17 @@ init = (projName) ->
log 'Changes you make via the REPL or by changing your .cljs files should appear live.', 'yellow' log 'Changes you make via the REPL or by changing your .cljs files should appear live.', 'yellow'
log 'Try this command as an example:', 'yellow' log 'Try this command as an example:', 'yellow'
log '(swap! app-state assoc :text "Hello Native World")', 'inverse' log '(swap! app-state assoc :text "Hello Native World")', 'inverse'
log ''
catch e catch e
logErr e.message if e.message.match /type\:.+lein/i
logErr 'Leiningen is required (http://leiningen.org/)'
else if e.message.match /type\:.+pod/i
logErr 'CocoaPods is required (https://cocoapods.org/)'
else
logErr e.message
process.exit 1 process.exit 1