convert project name to underscored path in repl script

This commit is contained in:
Dan Motzenbecker 2015-10-17 00:37:20 -04:00
parent 43ef0cead8
commit 944324f982
1 changed files with 6 additions and 2 deletions

View File

@ -53,6 +53,10 @@ pluckUuid = (line) ->
line.match(/\[(.+)\]/)[1]
toUnderscored = (s) ->
s.replace(camelRx, '$1_$2').toLowerCase()
writeConfig = (config) ->
try
fs.writeFileSync '.natal', JSON.stringify config, null, 2
@ -105,7 +109,7 @@ getBundleId = (name) ->
init = (projName) ->
projNameHyph = projName.replace(camelRx, '$1-$2').toLowerCase()
projNameUs = projName.replace(camelRx, '$1_$2').toLowerCase()
projNameUs = toUnderscored projName
try
log "Creating #{projName}", 'bgMagenta'
@ -354,7 +358,7 @@ startRepl = (name) ->
:watch-fn
(fn []
(cljs.repl/load-file repl-env
\"src/#{name}/core.cljs\"))
\"src/#{toUnderscored name}/core.cljs\"))
:analyze-path \"src\"))
"""),
cwd: process.cwd()