           # @log "Collecting placeholder names in #{templateDir}."
           return collectPlacholderNames paths, (err, varNames) =>
             return next err if err
-            values = makeValues varNames, @config.defaults, targetDir, templateName
+            values = makeValues varNames, @config.globals, targetDir, templateName
             missingVarNames = (name for name, value of values when value is null)
             @resolveValues missingVarNames, (err, resolvedValues) =>
               return next err if err


module.exports = class ProjectCreator
  constructor: (@config = {}, @resolveValues) ->
    @config.defaults = {} unless @config.defaults
  
  createProject: (targetDir, templateName, next) ->
    @findTemplateDir templateName, (err, templateDir) =>

    @log "================="
    @log easytable.printObj sortValues values

makeValues = (varNames, globals, targetDir, templateName) ->
  values = {}
  for varName in varNames
    values[varName] = if globals[varName] then globals[varName] else null 
  values["target-dir"] = targetDir
  values["template-name"] = templateName
  values["current-year"] = new Date().getFullYear()
