     throw err if err?
 
     # if it's a file, transform the file
-    if stats.isFile()
-      transform_file src_path, project, target_path
-    else if stats.isDirectory()
-      transform_dir src_path, project, target_path
+    await
+      if stats.isFile()
+        transform_file src_path, project, target_path, defer()
+      else if stats.isDirectory()
+        transform_dir src_path, project, target_path, defer()
+
+  next()
 
 module.exports = (json_file) ->
 

  throw err if err?
  target = (path.join process.cwd(), project.project)

  transform_dir fullpath, project, target
    args = args.concat ['-e', "s/#{key}/#{project[rep]}/g"]
  args = args.concat [target]

  proc = child_process.spawn 'sed', args, {'stdio' : 'ignore'}
  proc.on 'exit', next


transform_dir = (dir, project, target, next) ->

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