 testServer = require "./server"
 
 read = (fname, encoding="utf8") -> fs.readFileSync(fname, encoding)
+write = (fname, content, encoding="utf8") -> fs.writeFileSync(fname, content, encoding)
 exists = path.existsSync
 join = path.join
 pathSep = path.normalize("/")

    host = process.env.HOST || "localhost"
    components = allComponents()
    staticDirName = join testDirectory(), "static"
    return listTests(discoverTests(staticDirName), host, port) if argv.list
    commands.install()
    tests = discoverTests staticDirName
    extraHtml = getTestTemplate() + "\n" + stringBundlesAsRequirejsModule()

  for test in tests
    console.log("http://#{host}:#{port}/#{test.replace(/\.js$/, "")}")

templateCommands =
  requirejs: (config) ->
    join config.baseUrl || '', config.paths.csi, "require.js"
  extra: () ->
    stringBundlesAsRequirejsModule()
  config: (config) ->
    JSON.stringify config, null, "    "

commands =

  install: () ->
