   throw err if err?
   target = (path.join process.cwd(), project.project)
 
+  console.log target
   transform_dir fullpath, project, target

module.exports = (json_file) ->

  project = JSON.parse cat json_file

  throw "Couldn't parse project file #{json_file}" if not project?


  targetStream.destroy()

  # replace each key with each replacement using sed
  args = ['-i', '']
  for key, rep of keys
    args = args.concat ['-e', "s/#{key}/#{project[rep]}/g"]
  args = args.concat [target]

  console.log args

  proc = child_process.spawn 'sed', args, {'stdio' : ['ignore', 'ignore', 2]}
  await proc.on 'exit', defer code


transform_dir = (dir, project, target) ->

  console.log target

  # create the destination
  await fs.mkdir target, defer err
