           project: project.id
           code: file.content
           tests: ''
+        project.components.push graph
         out.component.send component
         continue
       out.project.send project

        basename = path.basename name, path.extname name
        if path.extname(name) is '.json'
          # JSON graph
          graph = JSON.parse file.content
          graph.properties = {} unless graph.properties
          graph.properties.project = project.id
          graph.properties.id = "#{project.id}_#{basename}"
          project.main = graph.properties.id unless project.main
          project.name = graph.properties.name unless project.name
          if graph.properties?.environment?.type
            project.type = graph.properties.environment.type unless project.type
          out.graph.send graph
          continue
        # Component
        component =

    project =
      id: data.payload.graph
      gist: data.payload.graph
      graphs: []
      components: []

    request = api.get "/gists/#{data.payload.graph}"
    request.on 'success', (res) ->
