           full: 'output'
       callback: (options) ->
         brunch.new options, ->
-          brunch.build parseOpts options
+          brunch.build parseOptions options
 
     build:
       help: 'Build a brunch project'

  options


exports.parseOpts = parseOpts = (options) ->
  config = loadConfig generateConfigPath options.appPath
  helpers.extend options, config


helpers = require './helpers'


generateConfigPath = (appPath) ->
  if appPath?
    path.join appPath, 'config.yaml'
  else
    'config.yaml'


loadConfig = (configPath) ->
  try
    config = (fs.readFileSync configPath).toString()
  catch error
