 
       @writeToSlimFile(filePath, compiler.buffer) if writeToFile
 
-  convertDir: (dirPath, writeToFile = true) ->
+  convertDir: (dirPath, writeToFile = true, removeHamlFiles = false) ->
     dirPath = @getAbsolutePath(dirPath)
     files = []
 

  getSlimPath: (path) ->
    path.replace(HAML_EXTENSION_REGEXP, '.slim')

  parser: ->
    @_parser ?= new @Parser()



    console.log "Converting files:"
    Q
      .allSettled(_.map(files, (filePath) =>
        console.log(filePath)
        @convertFile(filePath, writeToFile).then =>
          @deleteHamlFile(filePath) if removeHamlFiles
      ))
      .catch((e) ->
        console.log e
