 
   preview: (argv) ->
     preview = require('./preview')
-    dirs = argv._
-    dirs.push process.cwd() unless dirs.length
+    if argv._.length == 0
+      dirs = [process.cwd()]
+    else
+      dirs = argv._
 
-    preview argv._, (err, cnt, port) ->
+    preview dirs, (err, cnt, port) ->
       if err then return console.log chalk.red(err)
       console.log chalk.green("\\\\\\  ///  Versal SDK preview is started")
       console.log chalk.yellow(" \\\\\\///   ") + chalk.white("open http://localhost:#{port} in your favorite browser")

      }
      {
        name: "password"
        message: "Password at Versal.com:"
        required: true
        hidden: true
      }
    ]

    console.log 'Enter your Versal credentials to sign in:'
    prompt.get promptParams, callback

if typeof cli[cmd] == 'function'
  cli[cmd](argv)

pkg = require '../package.json'
fs = require 'fs'

if argv.env then config.env argv.env

commands =
  help: (argv) ->
    if argv.v || argv.version then return console.log pkg.version

