 ###
 
 build_tree = ->
-  file_map(@root, { file_ignores: @config.ignore })
+  i = @config.ignore
+  file_map(@root, { file_ignores: i, directory_ignores: i })
     .then (tree) => format_tree.call(@, path: '', children: tree)
 
 ###*

###

create_blob = (file) ->
  nodefn.call(fs.readFile, file.full_path, 'utf8')
  .then(get_blob_sha.bind(@))
  .then (sha) ->
    path: path.basename(file.path)

module.exports = (root, config) ->
  d = W.defer()

  config.ignore = _.compact([
    'ship*.conf',
    '.gitignore',
    '.git{/**,}',
    '**/node_modules{/**,}'].concat(config.ignore))
  repo_user = config.repo.split('/')[0]
  repo_name = config.repo.split('/')[1]

