+_ = require 'underscore'
 {ArgumentParser} = require 'argparse'
 PathSearcher = require './path-searcher'
 PathScanner = require './path-scanner'
+path = require "path"
 
 MAX_CONCURRENT_SEARCH = 20
+
+###
+Single Process
+###
 
 singleProcessSearch = (regex, scanner, searcher, doneCallback) ->
   finishedScanning = false


  scanner.scan()

buildRegex = (pattern) ->
  new RegExp(pattern, 'gi')


  options = argParser.parseArgs()

  if options.search
    if options.multiprocess
      multiProcessSearchMain(options)
    else
      singleProcessSearchMain(options)
  else
    singleProcessScanMain(options)

