Commit c5746445 authored by Leo Iannacone's avatar Leo Iannacone

better style code

parent 63211b43
#jshint multistr: true path = require('path')
Parser = -> Parser = ->
args = process.argv.slice(2) args = process.argv[2..]
help = -> help = ->
console.log "Usage: %s [-c config]\n -h print this help \n -c set user configuration file", process.argv[1].split("/").pop() console.log """
Usage: %s [-c config]
-h print this help
-c set user configuration file
""", process.argv[1].split("/").pop()
process.exit 0 process.exit 0
return return
@getUserConfig = -> @getUserConfig = ->
configFile = null if '-c' in args
args.forEach (val, index) -> if args.length < 2
if val is "-c" help()
configFile = args[index + 1] return args[args.indexOf('-c') + 1]
return return null
if configFile if '-h' in args
process.cwd() + "/" + configFile help()
else
null
args.forEach (val, index) ->
help() if val is "-h"
return
return
"use strict"
module.exports = Parser module.exports = Parser
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment