 path         = require('path')
 es           = require('event-stream')
 coffeescript = require('coffee-script')
+fs           = require('graceful-fs')
 _            = require('underscore')
 
 #


  # Uncomment for test files
  #directoryFilters: ['Accounts & Users']
  #fileFilters: 'creating-users.md'

  readOpts: ->
    root: path.join(__dirname, '..')
    fileFilter: @fileFilters
    directoryFilter: @directoryFilters

App.analyze()

F =
  failed: null

Ignored =
  files: []

App =
  analyze: ->
    @loadIgnored()
    readdirp @readOpts(), (file) =>
      return if @fileIsIgnored file.name
      _.each @parsers, (parser) =>
        failed = F.failed
        F.failed = parser.parse(file, failed)
