Better syntax

This commit is contained in:
Petros Aggelatos 2013-07-19 17:40:53 +03:00
parent f58923a36d
commit 7940a29057

View File

@ -75,8 +75,16 @@ updateRepo = (callback) ->
]
tasks2 = [
(callback) -> exec('npm install', cwd: 'hakiapp', callback) if fs.existsSync('package.json') ; callback()
(callback) -> exec('foreman start', cwd: 'hakiapp', callback) if fs.existsSync('Procfile') ; callback()
(callback) ->
if fs.existsSync('package.json')
exec('npm install', cwd: 'hakiapp', callback)
else
callback()
(callback) ->
if fs.existsSync('Procfile')
exec('foreman start', cwd: 'hakiapp', callback)
else
callback()
]
async.waterfall(tasks1, (error, hash) ->