pass name as arg

This commit is contained in:
Dan Motzenbecker 2015-08-25 23:48:43 -04:00
parent 151d9f6c4e
commit 95baffdb9e
1 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,9 @@
# Natal
# Bootstrap ClojureScript React Native apps
# Dan Motzenbecker
# http://oxism.com
# MIT License
fs = require 'fs'
crypto = require 'crypto'
{execSync} = require 'child_process'
@ -124,6 +130,8 @@ init = (projName) ->
log 'Try this command as an example:', 'yellow'
log '(swap! app-state assoc :text "Hello Native World")', 'inverse'
log ''
log '✔ Done', 'bgMagenta'
log ''
catch e
@ -137,3 +145,13 @@ init = (projName) ->
logErr e.message
process.exit 1
[_, _, name] = process.argv
unless name
logErr 'You must pass a project name as the first argument.'
logErr 'e.g. natal HelloWorld'
process.exit 1
init name