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

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

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



      @writeToSlimFile(filePath, compiler.buffer) if writeToFile

  convertDir: (dirPath, writeToFile = true, removeHamlFiles = false) ->
    dirPath = @getAbsolutePath(dirPath)
    files = []

