 fs = require 'fs-plus'
 CSON = require 'season'
 optimist = require 'optimist'
-delexe = require './delexe'
+Delexe = require './delexe'
 
 module.exports = ->
   cli = optimist.describe('h', 'Show this message').alias('h', 'help')

      process.exit(1)
      return

    html = new delexe().renderSync({filePath: outputPath, scopeName: cli.argv.scope})
    if outputPath
      fs.writeFileSync(outputPath, html)
    else
      console.log(html)
  else
    filePath = cli.argv.f or outputPath
    process.stdin.resume()

  outputPath = cli.argv.output
  outputPath = path.resolve(outputPath) if outputPath

  delexe = new Delexe()

  output = (outputPath, string) ->
    if outputPath
      fs.writeFileSync(outputPath, string)
    else
      console.log(string)

  if filePath
    filePath = path.resolve(filePath)
    unless fs.isFileSync(filePath)
