convert project name to underscored path in repl script
This commit is contained in:
parent
43ef0cead8
commit
944324f982
|
@ -53,6 +53,10 @@ pluckUuid = (line) ->
|
||||||
line.match(/\[(.+)\]/)[1]
|
line.match(/\[(.+)\]/)[1]
|
||||||
|
|
||||||
|
|
||||||
|
toUnderscored = (s) ->
|
||||||
|
s.replace(camelRx, '$1_$2').toLowerCase()
|
||||||
|
|
||||||
|
|
||||||
writeConfig = (config) ->
|
writeConfig = (config) ->
|
||||||
try
|
try
|
||||||
fs.writeFileSync '.natal', JSON.stringify config, null, 2
|
fs.writeFileSync '.natal', JSON.stringify config, null, 2
|
||||||
|
@ -105,7 +109,7 @@ getBundleId = (name) ->
|
||||||
|
|
||||||
init = (projName) ->
|
init = (projName) ->
|
||||||
projNameHyph = projName.replace(camelRx, '$1-$2').toLowerCase()
|
projNameHyph = projName.replace(camelRx, '$1-$2').toLowerCase()
|
||||||
projNameUs = projName.replace(camelRx, '$1_$2').toLowerCase()
|
projNameUs = toUnderscored projName
|
||||||
|
|
||||||
try
|
try
|
||||||
log "Creating #{projName}", 'bgMagenta'
|
log "Creating #{projName}", 'bgMagenta'
|
||||||
|
@ -354,7 +358,7 @@ startRepl = (name) ->
|
||||||
:watch-fn
|
:watch-fn
|
||||||
(fn []
|
(fn []
|
||||||
(cljs.repl/load-file repl-env
|
(cljs.repl/load-file repl-env
|
||||||
\"src/#{name}/core.cljs\"))
|
\"src/#{toUnderscored name}/core.cljs\"))
|
||||||
:analyze-path \"src\"))
|
:analyze-path \"src\"))
|
||||||
"""),
|
"""),
|
||||||
cwd: process.cwd()
|
cwd: process.cwd()
|
||||||
|
|
Loading…
Reference in New Issue