create lein project

This commit is contained in:
Dan Motzenbecker 2015-08-22 11:06:30 -04:00
parent be1faccc56
commit 29b2978e19

View File

@ -31,6 +31,19 @@ init = (projName) ->
execSync 'type lein'
execSync 'type pod'
log 'Creating Leiningen project'
execSync "lein new #{ projNameHyph }"
log 'Updating Leiningen project'
process.chdir projNameHyph
execSync "cp #{ resources }project.clj project.clj"
editSync 'project.clj', [[projNameHyphRx, projNameHyph]]
corePath = "src/#{ projNameUs }/core.clj"
fs.unlinkSync corePath
corePath += 's'
execSync "cp #{ resources }core.cljs #{ corePath }"
editSync corePath, [[projNameHyphRx, projNameHyph], [projNameRx, projName]]
catch e
logErr e.message