     -> @missingVarNames = (name for name, value of @values when value is null)
     -> @resolvedValues = resolveValues @missingVarNames
     -> @values[name] = value for name, value of @resolvedValues
+    -> log printValues @values
     -> @copyingFiles = ncp templateDir, targetDir
     -> @targetPaths = readdir targetDir
     -> @replacements = ([new RegExp("---#{name}---","g"),value] for name, value of @values)

    -> @renamePairs = (["#{targetDir}/#{path}","#{targetDir}/#{renames[path]}"] for path in @rpaths)
    -> @renamingFiles = applyEach @renamePairs, rename
  ]

mapRight = (pairs, iterator) ->
  [pair[0], iterator pair[1]] for pair in pairs

readdir = adapt readdir

module.exports = createProject = (targetDir, templateDir, config, resolveValues, log) ->
  Memoblock.do [
    -> @targetExists = fsExists targetDir
    -> throw new Error "Target directory #{targetDir} already exist." if @targetExists
